Create new variable for lynis executable.
This commit is contained in:
parent
9313d1a7ed
commit
4cd52e5405
@ -5,6 +5,7 @@
|
||||
ansible.builtin.set_fact:
|
||||
lynis_install_dir: /usr/local/lynis
|
||||
lynis_report: /home/ling/lynis.log
|
||||
lynis_exec: /usr/local/lynis/lynis
|
||||
sudoers_install_dir: /etc/sudoers.d/ansible
|
||||
when: ansible_distribution == "Pop!_OS"
|
||||
|
||||
@ -14,6 +15,7 @@
|
||||
ansible.builtin.set_fact:
|
||||
lynis_install_dir: /usr/local/lynis
|
||||
lynis_report: /root/lynis.log
|
||||
lynis_exec: /usr/local/lynis/lynis
|
||||
sudoers_install_dir: /etc/sudoers.d/ansible
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
@ -23,5 +25,6 @@
|
||||
ansible.builtin.set_fact:
|
||||
lynis_install_dir: /usr/local/lynis
|
||||
lynis_report: /root/lynis.log
|
||||
lynis_exec: /usr/local/lynis/lynis
|
||||
sudoers_install_dir: /usr/local/etc/sudoers.d/ansible
|
||||
when: ansible_distribution == "FreeBSD"
|
@ -6,7 +6,7 @@
|
||||
force: yes
|
||||
|
||||
- name: Run Lynis Audit System
|
||||
shell: "{{ lynis_install_dir }}"/lynis --no-colors audit system > "{{ lynis_report }}" 2>&1
|
||||
shell: "{{ lynis_exec }}" --no-colors audit system > "{{ lynis_report }}" 2>&1
|
||||
|
||||
- name: Make Lynis Report Readable
|
||||
shell: chmod 444 "{{ lynis_report }}"
|
Loading…
x
Reference in New Issue
Block a user