Use shell so that redirect can occur.

This commit is contained in:
Hyperling 2020-12-28 21:35:45 -06:00
parent de7b2ea00c
commit 0a33ace221

View File

@ -6,7 +6,7 @@
force: yes
- name: Run Lynis Audit System
command: /usr/local/lynis/lynis audit system > "{{ lynis_report }}"
shell: /usr/local/lynis/lynis audit system > "{{ lynis_report }}" 2>&1
- name: Make Lynis Report Readable
command: chmod 444 "{{ lynis_report }}"
shell: chmod 444 "{{ lynis_report }}"