When setting facts for localhost, does not set facts for other host patterns. Testing breakout of workstation facts.
This commit is contained in:
parent
f7ac16c699
commit
2cef5e7921
28
facts/workstation/package.yml
Normal file
28
facts/workstation/package.yml
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
# Define program names per OS for package builtin.
|
||||
|
||||
- name: Set Pop OS Package Names
|
||||
set_fact:
|
||||
firefox: firefox-esr
|
||||
thunderbird: thunderbird
|
||||
evolution: evolution
|
||||
sshfs: sshfs
|
||||
when: ansible_distribution == "Pop!_OS"
|
||||
|
||||
|
||||
- name: Set Debian and Ubuntu Package Names
|
||||
set_fact:
|
||||
firefox: firefox-esr
|
||||
thunderbird: thunderbird
|
||||
evolution: evolution
|
||||
sshfs: sshfs
|
||||
when: ansible_distribution in ("Debian","Ubuntu")
|
||||
|
||||
|
||||
- name: Set FreeBSD Package Names
|
||||
set_fact:
|
||||
firefox: firefox-esr
|
||||
thunderbird: thunderbird
|
||||
evolution: evolution
|
||||
sshfs: fusefs-sshfs
|
||||
when: ansible_distribution == "FreeBSD"
|
28
facts/workstation/service.yml
Normal file
28
facts/workstation/service.yml
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
# Define program names per OS for service builtin.
|
||||
|
||||
- name: Set Pop OS Service Names
|
||||
set_fact:
|
||||
cups: cups
|
||||
cups_pattern: cupsd
|
||||
cups_browse: cups-browsed
|
||||
cups_browse_pattern: cups-browsed
|
||||
when: ansible_distribution == "Pop!_OS"
|
||||
|
||||
|
||||
- name: Set Debian and Ubuntu Service Names
|
||||
set_fact:
|
||||
cups: cups
|
||||
cups_pattern: cupsd
|
||||
cups_browse: cups-browsed
|
||||
cups_browse_pattern: cups-browsed
|
||||
when: ansible_distribution in ("Debian","Ubuntu")
|
||||
|
||||
|
||||
- name: Set FreeBSD Service Names
|
||||
set_fact:
|
||||
cups: cups
|
||||
cups_pattern: cupsd
|
||||
cups_browse: cups-browsed
|
||||
cups_browse_pattern: cups-browsed
|
||||
when: ansible_distribution == "FreeBSD"
|
31
facts/workstation/system.yml
Normal file
31
facts/workstation/system.yml
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
# Define file, folder, and other facts per OS.
|
||||
|
||||
- name: Set Pop OS Facts
|
||||
set_fact:
|
||||
flatpak_distro: true
|
||||
lynis_install_dir: /usr/local/lynis
|
||||
lynis_report: /home/ling/lynis.log
|
||||
sudoers_install_dir: /etc/sudoers.d/ansible
|
||||
ansible_pull_exec: /usr/bin/ansible-pull
|
||||
when: ansible_distribution == "Pop!_OS"
|
||||
|
||||
|
||||
- name: Set Debian and Ubuntu Facts
|
||||
set_fact:
|
||||
flatpak_distro: true
|
||||
lynis_install_dir: /usr/local/lynis
|
||||
lynis_report: /root/lynis.log
|
||||
sudoers_install_dir: /etc/sudoers.d/ansible
|
||||
ansible_pull_exec: /usr/bin/ansible-pull
|
||||
when: ansible_distribution in ("Debian","Ubuntu")
|
||||
|
||||
|
||||
- name: Set FreeBSD Facts
|
||||
set_fact:
|
||||
flatpak_distro: false
|
||||
lynis_install_dir: /usr/local/lynis
|
||||
lynis_report: /root/lynis.log
|
||||
sudoers_install_dir: /usr/local/etc/sudoers.d/ansible
|
||||
ansible_pull_exec: /usr/local/bin/ansible-pull
|
||||
when: ansible_distribution == "FreeBSD"
|
13
facts/workstation/user.yml
Normal file
13
facts/workstation/user.yml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
# Define users and groups per OS type.
|
||||
|
||||
- name: Set Linux User Variables
|
||||
set_fact:
|
||||
root_group: root
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
|
||||
- name: Set FreeBSD User Variables
|
||||
set_fact:
|
||||
root_group: wheel
|
||||
when: ansible_system == "FreeBSD"
|
14
local.yml
14
local.yml
@ -8,10 +8,10 @@
|
||||
become: true
|
||||
|
||||
pre_tasks:
|
||||
- include: facts/system.yml
|
||||
- include: facts/package.yml
|
||||
- include: facts/service.yml
|
||||
- include: facts/user.yml
|
||||
- include: facts/general/system.yml
|
||||
- include: facts/general/package.yml
|
||||
- include: facts/general/service.yml
|
||||
- include: facts/general/user.yml
|
||||
|
||||
tasks:
|
||||
- include: tasks/general/software/packages.yml
|
||||
@ -33,6 +33,12 @@
|
||||
connection: local
|
||||
become: true
|
||||
|
||||
pre_tasks:
|
||||
- include: facts/workstation/system.yml
|
||||
- include: facts/workstation/package.yml
|
||||
- include: facts/workstation/service.yml
|
||||
- include: facts/workstation/user.yml
|
||||
|
||||
tasks:
|
||||
- include: tasks/linux/software/flatpaks.yml
|
||||
when: ansible_system == "Linux" and
|
||||
|
Loading…
x
Reference in New Issue
Block a user