forked from ansible-lockdown/RHEL9-CIS
audit variables seperated
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
c5a4866e1a
commit
8784941179
2 changed files with 65 additions and 54 deletions
30
tasks/audit_only.yml
Normal file
30
tasks/audit_only.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
|
||||
- name: Audit_Only | Create local Directories for hosts
|
||||
ansible.builtin.file:
|
||||
mode: '0755'
|
||||
path: "{{ audit_capture_files_dir }}/{{ inventory_hostname }}"
|
||||
recurse: true
|
||||
state: directory
|
||||
when: fetch_audit_files
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
|
||||
- name: Audit_only | Get audits from systems and put in group dir
|
||||
ansible.builtin.fetch:
|
||||
dest: "{{ audit_capture_files_dir }}/{{ inventory_hostname }}/"
|
||||
flat: true
|
||||
mode: '0644'
|
||||
src: "{{ pre_audit_outfile }}"
|
||||
when: fetch_audit_files
|
||||
|
||||
- name: Audit_only | Show Audit Summary
|
||||
when:
|
||||
- audit_only
|
||||
ansible.builtin.debug:
|
||||
msg: "The Audit results are: {{ pre_audit_summary }}."
|
||||
|
||||
- name: Audit_only | Stop Playbook Audit Only selected
|
||||
when:
|
||||
- audit_only
|
||||
ansible.builtin.meta: end_play
|
||||
Loading…
Add table
Add a link
Reference in a new issue