Add psutil dependency. Fix names in fact files.

This commit is contained in:
Hyperling 2021-02-06 17:00:55 -06:00
parent cd1cdef514
commit 0ed6685b30
8 changed files with 36 additions and 23 deletions

View File

@ -1,10 +1,10 @@
---
# Facts that must be gathered after running tasks.
- name: Facts | General | Gather | Locate bash
- name: General | Facts | Gather | Locate bash
shell: which bash
register: bash_exec
- name: Facts | General | Gather | Locate ansible-pull
- name: General | Facts | Gather | Locate ansible-pull
shell: which ansible-pull
register: ansible_pull_exec

View File

@ -2,14 +2,14 @@
# Define program names for package builtin.
# This file is for ALL systems and should not include UI components.
- name: Facts | General | Package | apt
- name: General | Facts | Package | apt
set_fact:
sshfs: sshfs
locate: locate
when: ansible_pkg_mgr == "apt"
- name: Facts | General | Package | FreeBSD
- name: General | Facts | Package | FreeBSD
set_fact:
sshfs: fusefs-sshfs
locate: htop # Placeholder to prevent errors. locate builtin FreeBSD.

View File

@ -1,7 +1,7 @@
---
# Define program names for service builtin.
- name: Facts | General | Service | Linux
- name: General | Facts | Service | Linux
set_fact:
cups: cups
cups_pattern: cupsd
@ -10,7 +10,7 @@
when: ansible_system == "Linux"
- name: Facts | General | Service | FreeBSD
- name: General | Facts | Service | FreeBSD
set_fact:
cups: cups
cups_pattern: cupsd

View File

@ -1,49 +1,49 @@
---
# Define file, folder, and other facts per OS.
- name: Facts | General | System | Pop OS
- name: General | Facts | System | Pop OS
set_fact:
lynis_install_dir: /usr/local/lynis
sudoers_install_dir: /etc/sudoers.d/
when: ansible_distribution == "Pop!_OS"
- name: Facts | General | System | Debian and Ubuntu
- name: General | Facts | System | Debian and Ubuntu
set_fact:
lynis_install_dir: /usr/local/lynis
sudoers_install_dir: /etc/sudoers.d/
when: ansible_distribution in ("Debian","Ubuntu")
- name: Facts | General | System | FreeBSD
- name: General | Facts | System | FreeBSD
set_fact:
lynis_install_dir: /usr/local/lynis
sudoers_install_dir: /usr/local/etc/sudoers.d/
when: ansible_system == "FreeBSD"
- name: Facts | General | System | 1337
- name: General | Facts | System | 1337
set_fact:
leet_drive: /mnt/leet
- name: Facts | General | System | 1337 Mounted?
- name: General | Facts | System | 1337 Mounted?
stat:
path: "{{ leet_drive }}/Temp/ansible"
register: leet_drive_details
- name: Facts | General | System | Report Location = 1337
- name: General | Facts | System | Report Location = 1337
set_fact:
report_location: "{{ leet_drive }}/Temp/ansible"
when: leet_drive_details.stat.exists
- name: Facts | General | System | Report Location = /root
- name: General | Facts | System | Report Location = /root
set_fact:
report_location: "/root"
report_scp_location: "Temp/ansible/"
when: not leet_drive_details.stat.exists
- name: Facts | General | System | Reports
- name: General | Facts | System | Reports
set_fact:
heartbeat_report: "{{ report_location }}/{{ ansible_hostname }}.txt"
lynis_report: "{{ report_location }}/{{ ansible_hostname }}_lynis.txt"

View File

@ -1,13 +1,13 @@
---
# Define users and groups per OS type.
- name: Facts | General | User | Linux
- name: General | Facts | User | Linux
set_fact:
root_group: root
when: ansible_system == "Linux"
- name: Facts | General | User | FreeBSD
- name: General | Facts | User | FreeBSD
set_fact:
root_group: wheel
when: ansible_system == "FreeBSD"

View File

@ -10,22 +10,34 @@
gnome_tweaks: gnome-tweaks
dconf_editor: dconf-editor
- name: Facts | Workstation | Package | Pop_OS! and Ubuntu
- name: Facts | Workstation | Package | Pop_OS!
set_fact:
flatpak_distro: true
firefox_esr: firefox
when: ansible_distribution in ("Pop!_OS", "Ubuntu")
psutil: python3-psutil
when: ansible_distribution == "Pop!_OS"
- name: Facts | Workstation | Package | Ubuntu
set_fact:
flatpak_distro: true
firefox_esr: firefox
psutil: python3-psutil
when: ansible_distribution == "Ubuntu"
- name: Facts | Workstation | Package | Debian
set_fact:
flatpak_distro: true
firefox_esr: firefox-esr
when: ansible_distribution in ("Debian")
psutil: python3-psutil
when: ansible_distribution == "Debian"
- name: Facts | Workstation | Package | FreeBSD
set_fact:
flatpak_distro: false
firefox_esr: firefox-esr
psutil: py37-psutil
when: ansible_system == "FreeBSD"

View File

@ -1,7 +1,7 @@
---
# Cron jobs specific to FreeBSD
- name: FreeBSD | Cron | Ansible | Enable SSHFS Job
- name: General | Cron | Ansible | FreeBSD | Enable SSHFS Job
cron:
user: ansible
name: "1337 SSHFS"
@ -10,7 +10,7 @@
state: present
disabled: no
- name: FreeBSD | Cron | Ansible | Enable Security Update
- name: General | Cron | Ansible | FreeBSD | Enable Security Update
cron:
user: ansible
name: "Security Update"

View File

@ -2,11 +2,12 @@
# GNOME settings, extensions, and setup.
# Make sure Gnome-Tweaks is installed
- name: Workstation | Account Management | GNOME | Install Settings Editors
- name: Workstation | Account Management | GNOME | Install Dependencies
package:
name:
- "{{ gnome_tweaks }}"
- "{{ dconf_editor }}"
- "{{ psutil }}"
state: present
@ -26,7 +27,7 @@
- name: Workstation | Account Management | GNOME | Favorites (FreeBSD)
dconf:
key: /org/gnome/shell/favorite-apps
value: "['org.gnome.Terminal.desktop', 'org.gnome.Nautilus.desktop', 'firefox.desktop', 'org.mozilla.Thunderbird.desktop', 'code.desktop']"
value: "['org.gnome.Terminal.desktop', 'org.gnome.Nautilus.desktop', 'firefox.desktop', 'org.mozilla.Thunderbird.desktop', 'code-oss.desktop']"
state: present
become_user: ling
when: ansible_system == "FreeBSD"