added fetch and ansible facts

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2025-04-01 09:51:53 +01:00
parent 3eaa1b594c
commit 7a3efd4920
No known key found for this signature in database
GPG key ID: 997FF7FE93AEB5B9
4 changed files with 132 additions and 0 deletions

View file

@ -212,6 +212,36 @@
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
ansible.builtin.debug: