working through each file
This commit is contained in:
49
tasks/facts.yml
Normal file
49
tasks/facts.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Set facts for installation
|
||||
ansible.builtin.set_fact:
|
||||
ext_become: "{{ not use_local }}" # if use_local is true, don't use sudo for external packages
|
||||
path_prefix: "{% if use_local %}{{ lookup(ansible.builtin.env, 'HOME') }}{% else %}{{ defaults.path.prefix }}{% endif %}"
|
||||
|
||||
- name: Set Linux specific facts
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
ansible.builtin.set_fact:
|
||||
app_images: [] # app_images to install
|
||||
flatpak_method: "{% if use_local %}user{% else %}system{% endif %}"
|
||||
flatpak_remotes: # flatpak remotes, includes flathub by default
|
||||
- name: flathub
|
||||
url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
flatpaks: [] # flatpak packages to install
|
||||
snap_pkgs: [] # snpacraft.io packages
|
||||
sys_pkg_become: true # Linux package managers require sudo access
|
||||
|
||||
- name: Set macOS specific facts
|
||||
when:
|
||||
- ansible_distribution == 'MacOSX'
|
||||
ansible.builtin.set_fact:
|
||||
brew_taps: [] # homebrew taps to add
|
||||
cask_pkgs: [] # homebrew casks
|
||||
pipx_exec: "/opt/homebrew/bin/pipx"
|
||||
sys_pkg_become: false # homebrew doesn't require sudo access
|
||||
tap_pkgs: [] # homebrew tap packages
|
||||
|
||||
- name: Set paths
|
||||
ansible.builtin.set_fact:
|
||||
paths:
|
||||
appimage: "{{ appimage_path | default(path_prefix ~ defaults.path.suffix.appimage) }}"
|
||||
archive: "{{ archive_path | default(path_prefix ~ defaults.path.suffix.archive) }}"
|
||||
bin: "{{ bin_path | default(path_prefix ~ defaults.path.suffix.bin) }}"
|
||||
cargo: "{{ cargo_path | default(path_prefix ~ defaults.path.suffix.cargo) }}"
|
||||
go: "{{ goroot | default(path_prefix ~ defaults.path.suffix.go) }}"
|
||||
pipx: "{{ pipx_path | default(path_prefix ~ defaults.path.suffix.pipx) }}"
|
||||
|
||||
- name: Set OS independant facts
|
||||
ansible.builtin.set_fact:
|
||||
archive_pkgs: [] # packages installed via prebuilt archive
|
||||
cargo_pkgs: [] # rust packages from cargo
|
||||
go_pkgs: [] # go applications
|
||||
npm_pkgs: [] # npm commands
|
||||
pipx_pkgs: [] # pipx packages
|
||||
src_pkgs: [] # packages built from source
|
||||
sys_pkgs: [] # system package manager packages, homebrew on macOS, dnf for RedHat based, apt for Debian Based
|
||||
Reference in New Issue
Block a user