Save reports and heartbeat to 1337 drive. Fix some fact names.

This commit is contained in:
Hyperling 2021-02-06 07:16:19 -06:00
parent f46d2495f2
commit 4ffc25c804
7 changed files with 27 additions and 15 deletions

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

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

@ -1,25 +1,28 @@
---
# Define file, folder, and other facts per OS.
- name: Facts | Workstation | System | Pop OS
- name: Facts | General | System | Pop OS
set_fact:
lynis_install_dir: /usr/local/lynis
lynis_report: /home/ling/lynis.log
sudoers_install_dir: /etc/sudoers.d/ansible
when: ansible_distribution == "Pop!_OS"
- name: Facts | Workstation | System | Debian and Ubuntu
- name: Facts | General | System | Debian and Ubuntu
set_fact:
lynis_install_dir: /usr/local/lynis
lynis_report: /root/lynis.log
sudoers_install_dir: /etc/sudoers.d/ansible
when: ansible_distribution in ("Debian","Ubuntu")
- name: Facts | Workstation | System | FreeBSD
- name: Facts | General | System | FreeBSD
set_fact:
lynis_install_dir: /usr/local/lynis
lynis_report: /root/lynis.log
sudoers_install_dir: /usr/local/etc/sudoers.d/ansible
when: ansible_system == "FreeBSD"
when: ansible_system == "FreeBSD"
- name: Facts | General | System | 1337
set_fact:
leet_drive: /mnt/leet
lynis_report: "/mnt/leet/Temp/ansible/{{ ansible_hostname }}_lynis.txt"
nmap_report: "/mnt/leet/Temp/ansible/{{ ansible_hostname }}_nmap.txt"

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

@ -3,7 +3,7 @@
- name: General | Account Management | Mounts | Create 1337 Folder
file:
path: /mnt/leet
path: "{{ leet_drive }}"
state: directory
mode: '0755'

@ -9,3 +9,12 @@
job: "sudo {{ ansible_pull_exec.stdout }} -o -U https://github.com/Hyperling/ansible.git"
state: present
disabled: no
- name: General | Cron | Ansible | Create Heartbeat Job
cron:
user: ansible
name: "Ansible Sync"
minute: "*/15"
job: "echo 'ALIVE' > /mnt/leet/Temp/ansible/{{ ansible_hostname }}.txt"
state: present
disabled: no

@ -9,5 +9,5 @@
- name: General | Tests | nmap | Make Viewable
file:
path: "/root/nmap.txt"
path: "{{ nmap_report }}"
mode: '0444'