forked from ansible-lockdown/RHEL9-CIS
fetch audit and compliance facts added
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
82904557c7
commit
576531e986
4 changed files with 134 additions and 0 deletions
|
|
@ -209,11 +209,43 @@
|
|||
|
||||
- name: "Run post_remediation audit"
|
||||
when: run_audit
|
||||
tags: always
|
||||
ansible.builtin.import_tasks:
|
||||
file: post_remediation_audit.yml
|
||||
|
||||
- name: Add ansible file showing Benchmark and levels applied
|
||||
when: Create_benchmark_facts
|
||||
tags:
|
||||
- always
|
||||
- benchmark
|
||||
block:
|
||||
- name: Create ansible facts directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_facts_path }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 'u=rwx,go=rx'
|
||||
|
||||
- name: Create ansible facts file
|
||||
ansible.builtin.template:
|
||||
src: etc/ansible/compliance_facts.j2
|
||||
dest: "{{ ansible_facts_path }}/compliance_facts.fact"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "u-x,go-wx"
|
||||
|
||||
- name: Fetch audit files
|
||||
when:
|
||||
- fetch_audit_output
|
||||
- run_audit
|
||||
tags: always
|
||||
ansible.builtin.import_tasks:
|
||||
file: fetch_audit_output.yml
|
||||
|
||||
- name: "Show Audit Summary"
|
||||
when: run_audit
|
||||
tags: always
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ audit_results.split('\n') }}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue