--- # Define file, folder, and other facts per 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: 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: 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: General | Facts | System | 1337 Drive set_fact: leet_ssh: 'ling@leet' leet_drive: /mnt/leet - name: General | Facts | System | 1337 Drive Mounted? stat: path: "{{ leet_drive }}/Temp/ansible" register: leet_drive_details - name: General | Facts | System | Report Location = 1337 set_fact: report_location: "{{ leet_drive }}/Temp/ansible" when: leet_drive_details.stat.exists - 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: General | Facts | System | Report File Names set_fact: heartbeat_report: "{{ ansible_hostname }}.txt" ansible_pull_report: "{{ ansible_hostname }}_last_pull_times.txt" lynis_report: "{{ ansible_hostname }}_lynis.txt" nmap_report: "{{ ansible_hostname }}_nmap.txt" - name: General | Facts | System | Report Locations (SSHFS) set_fact: heartbeat_report: "{{ report_location }}/{{ heartbeat_report }}" ansible_pull_report: "{{ report_location }}/pull/{{ ansible_pull_report }}" lynis_report: "{{ report_location }}/lynis/{{ lynis_report }}" nmap_report: "{{ report_location }}/nmap/{{ nmap_report }}" when: leet_drive_details.stat.exists - name: General | Facts | System | Report Locations (Local) set_fact: heartbeat_report: "{{ report_location }}/{{ heartbeat_report }}" ansible_pull_report: "{{ report_location }}//{{ ansible_pull_report }}" lynis_report: "{{ report_location }}/{{ lynis_report }}" nmap_report: "{{ report_location }}/{{ nmap_report }}" when: not leet_drive_details.stat.exists - name: General | Facts | System | Report Destinations (SCP) set_fact: heartbeat_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/{{ heartbeat_report }}" ansible_pull_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/pull/{{ ansible_pull_report }}" lynis_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/lynis/{{ lynis_report }}" nmap_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/nmap/{{ nmap_report }}" when: not leet_drive_details.stat.exists