2021-01-31 17:21:39 -06:00
|
|
|
---
|
2021-01-31 16:22:01 -06:00
|
|
|
# Define file, folder, and other facts per OS.
|
2020-12-28 21:32:28 -06:00
|
|
|
|
2021-02-14 07:22:29 -06:00
|
|
|
- name: General | Facts | System | Linux
|
2021-01-31 17:07:57 -06:00
|
|
|
set_fact:
|
2021-01-31 17:00:47 -06:00
|
|
|
lynis_install_dir: /usr/local/lynis
|
2021-02-06 09:42:47 -06:00
|
|
|
sudoers_install_dir: /etc/sudoers.d/
|
2021-02-14 07:22:29 -06:00
|
|
|
when: ansible_system == "Linux"
|
2020-12-28 21:32:28 -06:00
|
|
|
|
|
|
|
|
2021-02-06 17:00:55 -06:00
|
|
|
- name: General | Facts | System | FreeBSD
|
2021-01-31 17:09:07 -06:00
|
|
|
set_fact:
|
2021-01-31 17:00:47 -06:00
|
|
|
lynis_install_dir: /usr/local/lynis
|
2021-02-06 09:42:47 -06:00
|
|
|
sudoers_install_dir: /usr/local/etc/sudoers.d/
|
2021-02-06 07:16:19 -06:00
|
|
|
when: ansible_system == "FreeBSD"
|
|
|
|
|
2021-02-06 08:08:32 -06:00
|
|
|
|
2021-02-07 07:26:54 -06:00
|
|
|
- name: General | Facts | System | 1337 Drive
|
2021-02-06 07:16:19 -06:00
|
|
|
set_fact:
|
2021-02-07 07:26:54 -06:00
|
|
|
leet_ssh: 'ling@leet'
|
2021-02-06 07:16:19 -06:00
|
|
|
leet_drive: /mnt/leet
|
2021-02-06 09:18:23 -06:00
|
|
|
|
2021-02-07 07:26:54 -06:00
|
|
|
- name: General | Facts | System | 1337 Drive Mounted?
|
2021-02-06 09:18:23 -06:00
|
|
|
stat:
|
2021-02-06 09:27:08 -06:00
|
|
|
path: "{{ leet_drive }}/Temp/ansible"
|
2021-02-06 09:18:23 -06:00
|
|
|
register: leet_drive_details
|
|
|
|
|
|
|
|
|
2021-02-06 17:00:55 -06:00
|
|
|
- name: General | Facts | System | Report Location = 1337
|
2021-02-06 09:18:23 -06:00
|
|
|
set_fact:
|
|
|
|
report_location: "{{ leet_drive }}/Temp/ansible"
|
|
|
|
when: leet_drive_details.stat.exists
|
|
|
|
|
2021-02-06 17:00:55 -06:00
|
|
|
- name: General | Facts | System | Report Location = /root
|
2021-02-06 09:18:23 -06:00
|
|
|
set_fact:
|
|
|
|
report_location: "/root"
|
2021-02-07 09:36:08 -06:00
|
|
|
report_scp_location: "Temp/ansible"
|
2021-02-06 09:18:23 -06:00
|
|
|
when: not leet_drive_details.stat.exists
|
|
|
|
|
2021-02-07 08:47:31 -06:00
|
|
|
- name: General | Facts | System | Report File Names
|
2021-02-06 09:18:23 -06:00
|
|
|
set_fact:
|
2021-02-07 09:29:24 -06:00
|
|
|
heartbeat_report_name: "{{ ansible_hostname }}.txt"
|
|
|
|
ansible_pull_report_name: "{{ ansible_hostname }}_last_pull_times.txt"
|
|
|
|
lynis_report_name: "{{ ansible_hostname }}_lynis.txt"
|
|
|
|
nmap_report_name: "{{ ansible_hostname }}_nmap.txt"
|
2021-02-07 08:47:31 -06:00
|
|
|
|
|
|
|
- name: General | Facts | System | Report Locations (SSHFS)
|
|
|
|
set_fact:
|
2021-02-07 09:29:24 -06:00
|
|
|
heartbeat_report: "{{ report_location }}/{{ heartbeat_report_name }}"
|
|
|
|
ansible_pull_report: "{{ report_location }}/pull/{{ ansible_pull_report_name }}"
|
|
|
|
lynis_report: "{{ report_location }}/lynis/{{ lynis_report_name }}"
|
|
|
|
nmap_report: "{{ report_location }}/nmap/{{ nmap_report_name }}"
|
2021-02-07 08:47:31 -06:00
|
|
|
when: leet_drive_details.stat.exists
|
|
|
|
|
|
|
|
- name: General | Facts | System | Report Locations (Local)
|
|
|
|
set_fact:
|
2021-02-07 09:29:24 -06:00
|
|
|
heartbeat_report: "{{ report_location }}/{{ heartbeat_report_name }}"
|
|
|
|
ansible_pull_report: "{{ report_location }}/{{ ansible_pull_report_name }}"
|
|
|
|
lynis_report: "{{ report_location }}/{{ lynis_report_name }}"
|
|
|
|
nmap_report: "{{ report_location }}/{{ nmap_report_name }}"
|
2021-02-07 08:47:31 -06:00
|
|
|
when: not leet_drive_details.stat.exists
|
2021-02-07 07:32:01 -06:00
|
|
|
|
|
|
|
- name: General | Facts | System | Report Destinations (SCP)
|
|
|
|
set_fact:
|
2021-02-07 09:29:24 -06:00
|
|
|
heartbeat_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/{{ heartbeat_report_name }}"
|
|
|
|
ansible_pull_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/pull/{{ ansible_pull_report_name }}"
|
|
|
|
lynis_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/lynis/{{ lynis_report_name }}"
|
|
|
|
nmap_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/nmap/{{ nmap_report_name }}"
|
2021-02-07 07:32:01 -06:00
|
|
|
when: not leet_drive_details.stat.exists
|