diff --git a/facts/general/package.yml b/facts/general/package.yml index 34775eb..daf49a4 100644 --- a/facts/general/package.yml +++ b/facts/general/package.yml @@ -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. diff --git a/facts/general/service.yml b/facts/general/service.yml index 708b6fb..a339301 100644 --- a/facts/general/service.yml +++ b/facts/general/service.yml @@ -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 diff --git a/facts/general/system.yml b/facts/general/system.yml index 968121e..701bd0e 100644 --- a/facts/general/system.yml +++ b/facts/general/system.yml @@ -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" \ No newline at end of file + 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" \ No newline at end of file diff --git a/facts/general/user.yml b/facts/general/user.yml index 722ff4d..149454c 100644 --- a/facts/general/user.yml +++ b/facts/general/user.yml @@ -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" \ No newline at end of file diff --git a/tasks/general/acct_mgmt/mounts.yml b/tasks/general/acct_mgmt/mounts.yml index 4984b96..6298c9f 100644 --- a/tasks/general/acct_mgmt/mounts.yml +++ b/tasks/general/acct_mgmt/mounts.yml @@ -3,7 +3,7 @@ - name: General | Account Management | Mounts | Create 1337 Folder file: - path: /mnt/leet + path: "{{ leet_drive }}" state: directory mode: '0755' diff --git a/tasks/general/cron/ansible.yml b/tasks/general/cron/ansible.yml index 986c091..1b95b87 100644 --- a/tasks/general/cron/ansible.yml +++ b/tasks/general/cron/ansible.yml @@ -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 diff --git a/tasks/general/tests/nmap.yml b/tasks/general/tests/nmap.yml index 35438f7..02a3523 100644 --- a/tasks/general/tests/nmap.yml +++ b/tasks/general/tests/nmap.yml @@ -9,5 +9,5 @@ - name: General | Tests | nmap | Make Viewable file: - path: "/root/nmap.txt" + path: "{{ nmap_report }}" mode: '0444' \ No newline at end of file