2021-01-31 17:21:39 -06:00
|
|
|
---
|
|
|
|
|
2020-12-28 20:57:05 -06:00
|
|
|
- name: Install Lynis
|
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
|
|
|
|
|
2020-12-28 21:32:28 -06:00
|
|
|
- name: Run Lynis Audit System
|
2021-01-31 13:50:27 -06:00
|
|
|
shell: "{{ lynis_install_dir }}/lynis --no-colors audit system > {{ lynis_report }} 2>&1"
|
2020-12-28 21:19:01 -06:00
|
|
|
|
2020-12-28 21:32:28 -06:00
|
|
|
- name: Make Lynis Report Readable
|
2021-01-31 17:17:14 -06:00
|
|
|
file:
|
2021-01-31 13:55:18 -06:00
|
|
|
path: "{{ lynis_report }}"
|
|
|
|
mode: '0444'
|