fixing up formatting and style
This commit is contained in:
@@ -1,15 +1,28 @@
|
||||
# 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['release'] }}"
|
||||
|
||||
- name: Set package_home_base for Darwin
|
||||
when:
|
||||
- ansible_facts["system"] == 'Darwin'
|
||||
- system == 'Darwin'
|
||||
ansible.builtin.set_fact:
|
||||
package_home_base: /Users
|
||||
|
||||
- name: Set package_home_base for Linux
|
||||
when:
|
||||
- ansible_facts["system"] == 'Linux' or
|
||||
ansible_facts["os_family"] == 'FreeBSD'
|
||||
- system == 'Linux' or
|
||||
os_family == 'FreeBSD'
|
||||
ansible.builtin.set_fact:
|
||||
package_home_base: /home
|
||||
|
||||
@@ -22,7 +35,7 @@
|
||||
path_source: "{{ install_prefix }}/source"
|
||||
path_go: "{{ install_prefix }}/go"
|
||||
path_pipx: "{{ install_prefix }}/pipx"
|
||||
store_path: "{{ ansible_facts['user_dir'] }}/.cache/ansible_role_package"
|
||||
store_path: "{{ user_dir }}/.cache/ansible_role_package"
|
||||
path_lib: "{{ install_prefix }}/lib"
|
||||
|
||||
- name: Set install_become_group from install_become_user
|
||||
@@ -34,7 +47,7 @@
|
||||
|
||||
- name: Set Linux specific facts
|
||||
when:
|
||||
- ansible_facts["system"] == 'Linux'
|
||||
- system == 'Linux'
|
||||
ansible.builtin.set_fact:
|
||||
pipx_exec: "/usr/bin/pipx"
|
||||
path_lib: lib64
|
||||
@@ -42,13 +55,13 @@
|
||||
|
||||
- name: Set alpine linux specific facts
|
||||
when:
|
||||
- ansible_facts["os_family"] == 'Alpine'
|
||||
- os_family == 'Alpine'
|
||||
ansible.builtin.set_fact:
|
||||
path_lib: lib
|
||||
|
||||
- name: Set dist code if RedHat based
|
||||
when:
|
||||
- ansible_facts["os_family"] == 'RedHat'
|
||||
- os_family == 'RedHat'
|
||||
changed_when: false
|
||||
register: rpm_dist
|
||||
ansible.builtin.command:
|
||||
@@ -56,8 +69,8 @@
|
||||
|
||||
- name: Set macOS specific facts
|
||||
when:
|
||||
- ansible_facts["distribution"] == 'MacOSX' or
|
||||
ansible_facts["distribution"] == 'MacOS'
|
||||
- distribution == 'MacOSX' or
|
||||
distribution == 'MacOS'
|
||||
ansible.builtin.set_fact:
|
||||
brewtap: [] # homebrew taps to add
|
||||
pipx_exec: "/opt/homebrew/bin/pipx" # pipx executable
|
||||
|
||||
Reference in New Issue
Block a user