Squash merge move_to_single_file_pkgs into main

This commit is contained in:
Matthew Stobbs
2026-04-13 14:50:45 -06:00
parent ff740426c8
commit 8dc427f027
373 changed files with 3883 additions and 9963 deletions

View File

@@ -1,68 +1,68 @@
# vim: set filetype=yaml.ansible :
---
- name: Set common facts
ansible.builtin.set_fact:
distribution: "{{ ansible_facts['distribution'] }}"
system: "{{ ansible_facts['system'] }}"
os_family: "{{ ansible_facts['os_family'] }}"
user_dir: "{{ ansible_facts['user_dir'] }}"
user_id: "{{ ansible_facts['user_id'] }}"
user_gid: "{{ ansible_facts['user_gid'] }}"
os_version:
major: "{{ ansible_facts['distribution_major_version'] }}"
version: "{{ ansible_facts['distribution_version'] }}"
release: "{{ ansible_facts['distribution_release'] }}"
- name: Set package_home_base for Darwin
when:
- ansible_system == 'Darwin'
- system == 'Darwin'
ansible.builtin.set_fact:
package_home_base: /Users
- name: Set package_home_base for Linux
when:
- ansible_system == 'Linux'
- system == 'Linux' or
os_family == 'FreeBSD'
ansible.builtin.set_fact:
package_home_base: /home
- name: Set local path prefix
when:
- use_local
- name: Set default paths
ansible.builtin.set_fact:
path:
prefix: "{{ package_home_base }}/{{ ansible_ssh_user }}/.local"
path_appimage: "{{ install_prefix }}/appimage"
path_archive: "{{ install_prefix }}/archive"
path_bin: "{{ install_prefix }}/bin"
path_cargo: "{{ install_prefix }}/cargo"
path_source: "{{ install_prefix }}/source"
path_go: "{{ install_prefix }}/go"
path_zig: "{{ install_prefix }}/zig"
path_pipx: "{{ install_prefix }}/pipx"
store_path: "{{ user_dir }}/.cache/ansible_role_package"
path_lib: "{{ install_prefix }}/lib"
- name: Set non-local path prefix
when:
- not use_local
ansible.builtin.set_fact:
path:
prefix: "{{ defaults.path.prefix }}"
- name: Set install variables
ansible.builtin.set_fact:
ext_become: "{{ not use_local }}"
path:
prefix: "{{ path.prefix }}"
appimage: "{{ path.appimage | default(path.prefix ~ defaults.path.suffix.appimage) }}"
archive: "{{ path.archive | default(path.prefix ~ defaults.path.suffix.archive) }}"
bin: "{{ path.bin | default(path.prefix ~ defaults.path.suffix.bin) }}"
cargo: "{{ path.cargo | default(path.prefix ~ defaults.path.suffix.cargo) }}"
go: "{% if ansible_distribution == 'MacOSX' %}/usr/local/go{% else %}{{ path.go | default(path.prefix ~ defaults.path.suffix.go) }}{% endif %}"
pipx: "{{ path.pipx | default(path.prefix ~ defaults.path.suffix.pipx) }}"
- name: Set install_become_group from install_become_user
block:
- name: Get install_become_user userinfo
ansible.builtin.getent:
database: passwd
key: "{{ install_become_user }}"
- name: Set Linux specific facts
when:
- ansible_system == 'Linux'
- system == 'Linux'
ansible.builtin.set_fact:
flatpak_remote: # flatpak remotes, includes flathub by default
- name: flathub
url: https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak_method: "{% if use_local %}user{% else %}system{% endif %}"
pkg_appimage: [] # appimages to install
pkg_flatpak: [] # flatpak packages to install
pkg_snap: [] # snpacraft.io packages
pipx_exec: "/usr/bin/pipx"
sys_pkg_become: true # Linux package managers require sudo access
lib_path: lib64
path_lib: lib64
root_prefix: /usr/local
- name: Set alpine linux specific facts
when:
- ansible_os_family == 'Alpine'
- os_family == 'Alpine'
ansible.builtin.set_fact:
lib_path: lib
path_lib: lib
- name: Set rpm dist if RedHat based
- name: Set dist code if RedHat based
when:
- ansible_os_family == 'RedHat'
- os_family == 'RedHat'
changed_when: false
register: rpm_dist
ansible.builtin.command:
@@ -70,22 +70,11 @@
- name: Set macOS specific facts
when:
- ansible_distribution == 'MacOSX'
- distribution == 'MacOSX' or
distribution == 'MacOS'
ansible.builtin.set_fact:
brewtap: [] # homebrew taps to add
pipx_exec: "/opt/homebrew/bin/pipx"
pipx_exec: "/opt/homebrew/bin/pipx" # pipx executable
pkg_cask: [] # homebrew casks
pkg_tap: [] # homebrew tap packages
sys_pkg_become: false # homebrew doesn't require sudo access
lib_path: lib
- name: Set OS independant facts
ansible.builtin.set_fact:
pkg_archive: [] # packages installed via prebuilt archive
pkg_cargo: [] # rust packages from cargo
pkg_go: [] # go applications
pkg_npm: [] # npm commands
pkg_pipx: [] # pipx packages
pkg_zig: []
pkg_src: [] # packages built from source
pkg_sys: [] # system package manager packages, homebrew on macOS, dnf for RedHat based, apt for Debian Based
path_lib: lib # macos shared library path