84 lines
3.1 KiB
YAML
84 lines
3.1 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
---
|
|
- name: Set package_home_base for Darwin
|
|
when:
|
|
- ansible_system == 'Darwin'
|
|
ansible.builtin.set_fact:
|
|
package_home_base: /Users
|
|
|
|
- name: Set package_home_base for Linux
|
|
when:
|
|
- ansible_system == 'Linux'
|
|
ansible.builtin.set_fact:
|
|
package_home_base: /home
|
|
|
|
- name: Set defaults paths
|
|
ansible.builtin.set_fact:
|
|
install_prefix: "{{ install_prefix | default(default_install_prefix) }}"
|
|
default_store_path: "{{ ansible_user_dir }}/.cache/ansible_role_package"
|
|
default_path_appimage: "{{ install_prefix | default(default_install_prefix) }}/appimage"
|
|
default_path_archive: "{{ install_prefix | default(default_install_prefix) }}/archive"
|
|
default_path_bin: "{{ install_prefix | default(default_install_prefix) }}/bin"
|
|
default_path_cargo: "{{ install_prefix | default(default_install_prefix) }}/cargo"
|
|
default_path_go: "{{ install_prefix | default(default_install_prefix) }}/go"
|
|
default_path_pipx: "{{ install_prefix | default(default_install_prefix) }}/pipx"
|
|
|
|
- name: Set install variables
|
|
ansible.builtin.set_fact:
|
|
store_path: "{{ store_path | default(default_store_path) }}"
|
|
path_appimage: "{{ path_appimage | default(default_path_appimage) }}"
|
|
path_archive: "{{ path_archive | default(default_path_archive) }}"
|
|
path_bin: "{{ path_bin | default(default_path_bin) }}"
|
|
path_cargo: "{{ path_cargo | default(default_path_cargo) }}"
|
|
path_go: "{{ path_go | default(default_path_go) }}"
|
|
path_pipx: "{{ path_pipx | default(default_path_pipx) }}"
|
|
|
|
- name: Set OS independant facts
|
|
ansible.builtin.set_fact:
|
|
pkg_archive: [] # packages installed via prebuilt archive
|
|
pkg_cargo: [] # rust packages from cargo using `cargo install`
|
|
pkg_cargo_build: [] # rust packages using `cargo build` before install
|
|
pkg_go: [] # go applications
|
|
pkg_npm: [] # npm commands
|
|
pkg_pipx: [] # pipx packages
|
|
pkg_src: [] # packages built from source
|
|
pkg_sys: [] # system package manager packages, homebrew on macOS, dnf for RedHat based, apt for Debian Based
|
|
pkg_zig: [] # zig packages
|
|
|
|
- name: Set Linux specific facts
|
|
when:
|
|
- ansible_system == 'Linux'
|
|
ansible.builtin.set_fact:
|
|
flatpak_remotes: "{{ default_flatpak_remotes }}"
|
|
pkg_appimage: [] # appimages to install
|
|
pkg_flatpak: [] # flatpak packages to install
|
|
pkg_snap: [] # snpacraft.io packages
|
|
pipx_exec: "/usr/bin/pipx"
|
|
path_lib: lib64
|
|
root_prefix: /usr/local
|
|
|
|
- name: Set alpine linux specific facts
|
|
when:
|
|
- ansible_os_family == 'Alpine'
|
|
ansible.builtin.set_fact:
|
|
path_lib: lib
|
|
|
|
- name: Set dist code if RedHat based
|
|
when:
|
|
- ansible_os_family == 'RedHat'
|
|
changed_when: false
|
|
register: rpm_dist
|
|
ansible.builtin.command:
|
|
cmd: rpm --eval "%{dist}"
|
|
|
|
- name: Set macOS specific facts
|
|
when:
|
|
- ansible_distribution == 'MacOSX' or
|
|
ansible_distribution == 'MacOS'
|
|
ansible.builtin.set_fact:
|
|
brewtap: [] # homebrew taps to add
|
|
pipx_exec: "/opt/homebrew/bin/pipx" # pipx executable
|
|
pkg_cask: [] # homebrew casks
|
|
pkg_tap: [] # homebrew tap packages
|
|
path_lib: lib # macos shared library path
|