env-ansible/tasks/hardness_check_lynis.yml
2020-12-28 21:41:43 -06:00

12 lines
346 B
YAML

- name: Install Lynis
ansible.builtin.git:
repo: https://github.com/CISOfy/lynis
dest: "{{ lynis_install_dir }}"
clone: yes
force: yes
- name: Run Lynis Audit System
shell: /usr/local/lynis/lynis --no-colors audit system > "{{ lynis_report }}" 2>&1
- name: Make Lynis Report Readable
shell: chmod 444 "{{ lynis_report }}"