2020-12-28 20:57:05 -06:00
|
|
|
- name: Install Lynis
|
|
|
|
ansible.builtin.git:
|
|
|
|
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
|
2020-12-28 21:35:45 -06:00
|
|
|
shell: /usr/local/lynis/lynis 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
|
2020-12-28 21:35:45 -06:00
|
|
|
shell: chmod 444 "{{ lynis_report }}"
|