mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 14:23:05 +00:00
27 lines
763 B
YAML
27 lines
763 B
YAML
---
|
|
- name: Audit_Only | Create local Directories for hosts
|
|
when: fetch_audit_files
|
|
ansible.builtin.file:
|
|
mode: "0755"
|
|
path: "{{ audit_capture_files_dir }}/{{ inventory_hostname }}"
|
|
recurse: true
|
|
state: directory
|
|
delegate_to: localhost
|
|
become: false
|
|
|
|
- name: Audit_only | Get audits from systems and put in group dir
|
|
when: fetch_audit_files
|
|
ansible.builtin.fetch:
|
|
dest: "{{ audit_capture_files_dir }}/{{ inventory_hostname }}/"
|
|
flat: true
|
|
mode: "0644"
|
|
src: "{{ pre_audit_outfile }}"
|
|
|
|
- name: Audit_only | Show Audit Summary
|
|
when: audit_only
|
|
ansible.builtin.debug:
|
|
msg: "{{ audit_results.split('\n') }}"
|
|
|
|
- name: Audit_only | Stop Playbook Audit Only selected
|
|
when: audit_only
|
|
ansible.builtin.meta: end_play
|