2021-01-31 17:21:39 -06:00
|
|
|
---
|
2021-02-03 21:17:48 -06:00
|
|
|
# Lynis hardness check.
|
2021-01-31 17:21:39 -06:00
|
|
|
|
2023-02-19 10:04:10 -06:00
|
|
|
- name: General | Tests | Lynis | Set Facts
|
|
|
|
set_fact:
|
|
|
|
lynis_file: "{{ user_user.home }}/Reports/{{ lynis_report }}"
|
|
|
|
|
|
|
|
- name: General | Tests | Lynis | Set Facts 2
|
|
|
|
set_fact:
|
|
|
|
lynis_temp_file: "{{ lynis_file }}.tmp"
|
|
|
|
|
2022-03-27 08:14:06 -05:00
|
|
|
- name: General | Tests | Lynis | Rename Old Install
|
|
|
|
shell: mv "/usr/local/lynis" "/usr/local/src/"
|
|
|
|
ignore_errors: yes
|
|
|
|
|
2021-02-02 21:28:17 -06:00
|
|
|
- name: General | Tests | Lynis | Install
|
2021-01-31 17:17:14 -06:00
|
|
|
git:
|
2020-12-28 20:57:05 -06:00
|
|
|
repo: https://github.com/CISOfy/lynis
|
2020-12-28 21:32:28 -06:00
|
|
|
dest: "{{ lynis_install_dir }}"
|
2020-12-28 20:57:05 -06:00
|
|
|
clone: yes
|
|
|
|
force: yes
|
2021-12-17 17:34:21 -06:00
|
|
|
ignore_errors: yes
|
2020-12-28 20:57:05 -06:00
|
|
|
|
2021-07-11 11:11:33 -05:00
|
|
|
- name: General | Tests | Lynis | Ensure Permissions (Looking at you Parrot OS!)
|
|
|
|
file:
|
|
|
|
path: "{{ lynis_install_dir }}"
|
|
|
|
state: directory
|
2021-07-11 12:09:33 -05:00
|
|
|
mode: '0644'
|
2021-07-11 11:11:33 -05:00
|
|
|
owner: root
|
Add initial HUGO support, FreeBSD 13 support, and script for Ansible to hit dev branch. (#4)
* Create HUGO file.
* Add HUGO.
* Add script for running system against development branch.
* Add newline to end of file.
* Comment unused blocks.
* Add path of site that HUGO should host.
* Newlines, comments, and HUGO path. (#2) (#3)
* Create HUGO file.
* Add HUGO.
* Add script for running system against development branch.
* Add newline to end of file.
* Comment unused blocks.
* Add path of site that HUGO should host.
* FreeBSD is complaining about certbot not having dict object stdout. This whole playbook is supposed to be skipped though, lol.
* FreeBSD 13 is still mad. Ansible 2.11.2, jinja 2.11.2 (same version number??), Python 3.8.10.
* Fix root group to be existing variable. FreeBSD uses wheel.
* Allow choosing Github branch dynamically.
* `branch` needs to be at General level. Testing if this works...
* Change other `localhost` to `everything`.
* Update FreeBSD status.
* Goodbye, Code-OSS on Linux!
* Delete a terrible file.
* Remove excess tag.
* "Fix" SSHFS for FreeBSD.
* Variablize FreeBSD's loading of fusefs.
* Variablize /etc/rc.conf. Enable FuseFS more properly.
* Add beginning ticks.
* Add missing playbook.
* Enable FreeBSD mount job.
* Rearrange items to be more consistent with comment.
* It seems FreeBSD removed the `gnome3` metapackage. Use `gnome3-lite` instead. Also add Telegram.
* Python is to 3.8 now.
* Expand on FreeBSD work.
* Expand on FreeBSD work.
* Add placeholders for Gitlab.
* Add parameter for Gitlab install.
* Add Gitlab playbook.
* Ensure FreeBSD uses the correct Python install.
* Add newline.
* Fix NFS for FreeBSD workstations.
* Remove unnecessary line, restricted install to Linux in playbook.
* Fix mount options for FreeBSD.
* Fix mount number, as well as system-specific facts.
* Add placeholders for remote viewing.
* Add RDP for FreeBSD.
* Omg! It works! Add setting enforcement.
* Always remove OSS.
* Remove hosts from explicit dev testing.
2021-07-19 07:07:03 -05:00
|
|
|
group: "{{ root_group }}"
|
2021-07-11 11:11:33 -05:00
|
|
|
recurse: yes
|
2021-07-11 11:08:08 -05:00
|
|
|
|
2021-07-11 12:09:33 -05:00
|
|
|
- name: General | Tests | Lynis | Ensure Permissions 2
|
|
|
|
file:
|
|
|
|
path: "{{ lynis_install_dir }}/lynis"
|
|
|
|
mode: '0755'
|
|
|
|
|
2023-02-19 10:04:10 -06:00
|
|
|
- name: General | Tests | Lynis | Ensure Folder Permissions
|
|
|
|
file:
|
|
|
|
path: "{{ lynis_install_dir }}"
|
|
|
|
state: directory
|
|
|
|
mode: '0755'
|
|
|
|
recurse: no
|
|
|
|
|
2021-02-02 21:28:17 -06:00
|
|
|
- name: General | Tests | Lynis | Run System Audit
|
2023-02-19 10:04:10 -06:00
|
|
|
shell: "{{ item }}"
|
|
|
|
loop:
|
|
|
|
- "./lynis audit system --no-colors > {{ lynis_temp_file }} 2>&1"
|
|
|
|
- "mv {{ lynis_temp_file }} {{ lynis_file }}"
|
2021-02-06 07:27:57 -06:00
|
|
|
args:
|
|
|
|
executable: "{{ bash_exec.stdout }}"
|
2022-03-27 08:14:06 -05:00
|
|
|
chdir: "{{ lynis_install_dir }}"
|
2020-12-28 21:19:01 -06:00
|
|
|
|
2021-02-02 21:28:17 -06:00
|
|
|
- name: General | Tests | Lynis | Make Report Readable
|
2021-01-31 17:17:14 -06:00
|
|
|
file:
|
2023-02-19 10:04:10 -06:00
|
|
|
path: "{{ lynis_file }}"
|
|
|
|
mode: '0644'
|