Starting to test Ubuntu Server. Need to find a way to get it working without putting it in the hosts file.

This commit is contained in:
Hyperling 2021-01-31 15:38:46 -06:00
parent 9395e309a5
commit 5c47f396ec
4 changed files with 17 additions and 31 deletions

View File

@ -1,7 +1,7 @@
--- ---
# Define what the file and folder names should be on each OS. # Define what the file and folder names should be on each OS.
- name: Set Pop!_OS FS Names - name: Set Pop!_OS Desktop Facts
ansible.builtin.set_fact: ansible.builtin.set_fact:
flatpak_distro: yes flatpak_distro: yes
lynis_install_dir: /usr/local/lynis lynis_install_dir: /usr/local/lynis
@ -11,16 +11,16 @@
# TODO Needs tested # TODO Needs tested
- name: Set Ubuntu FS Names - name: Set Debian+Ubuntu Server Facts
ansible.builtin.set_fact: ansible.builtin.set_fact:
flatpak_distro: yes flatpak_distro: yes
lynis_install_dir: /usr/local/lynis lynis_install_dir: /usr/local/lynis
lynis_report: /root/lynis.log lynis_report: /root/lynis.log
sudoers_install_dir: /etc/sudoers.d/ansible sudoers_install_dir: /etc/sudoers.d/ansible
when: ansible_distribution == "Ubuntu" when: ansible_distribution in ("Debian","Ubuntu")
- name: Set FreeBSD FS Names - name: Set FreeBSD Facts
ansible.builtin.set_fact: ansible.builtin.set_fact:
flatpak_distro: no flatpak_distro: no
lynis_install_dir: /usr/local/lynis lynis_install_dir: /usr/local/lynis

View File

@ -3,15 +3,10 @@
- name: Set Linux User Variables - name: Set Linux User Variables
ansible.builtin.set_fact: ansible.builtin.set_fact:
root: root
root_group: root root_group: root
ansible: ansible when: ansible_system == "Linux"
when: ansible_distribution == "Pop!_OS" or
ansible_distribution == "Ubuntu"
- name: Set FreeBSD User Variables - name: Set FreeBSD User Variables
ansible.builtin.set_fact: ansible.builtin.set_fact:
root: root
root_group: wheel root_group: wheel
ansible: ansible when: ansible_system == "FreeBSD"
when: ansible_distribution == "FreeBSD"

9
hosts
View File

@ -1,12 +1,9 @@
[all]
localhost
[workstation] [workstation]
x570 x570
dell-laptop dell-laptop
[server] [server]
freeboy freeboy
[dad]
not_installed_yet
[on_a_home_network]
192.168.[0:255].[0:255]

View File

@ -21,7 +21,7 @@
ignore_errors: yes ignore_errors: yes
# Linux Workstations # Workstations
- name: UI Setup - name: UI Setup
hosts: workstation hosts: workstation
connection: local connection: local
@ -29,19 +29,13 @@
tasks: tasks:
- include: tasks/flatpaks.yml - include: tasks/flatpaks.yml
when: ansible_distribution != "FreeBSD" when: ansible_system == "Linux" and
and "{{ flatpak_distro }} == yes" "{{ flatpak_distro }} == yes"
- shell: echo "Not implemented yet. :("
when: ansible_system == "Linux" and
# FreeBSD Workstations "{{ flatpak_distro }} == no"
- name: FreeBSD UI Setup
hosts: workstation
connection: local
become: true
tasks:
- include: tasks/freebsd_gui.yml - include: tasks/freebsd_gui.yml
when: ansible_distribution == "FreeBSD" when: ansible_system == "FreeBSD"
# Run Hardness Checks # Run Hardness Checks