2022-01-07 09:06:18 +00:00
|
|
|
---
|
|
|
|
|
# Post tasks
|
|
|
|
|
|
|
|
|
|
- name: Perform DNF package cleanup
|
|
|
|
|
dnf:
|
2022-01-13 15:31:02 +00:00
|
|
|
autoremove: true
|
2022-01-13 16:51:17 +00:00
|
|
|
changed_when: false
|
2022-01-07 09:06:18 +00:00
|
|
|
|
2022-02-02 11:25:03 +00:00
|
|
|
- name: Gather the package facts after remediation
|
|
|
|
|
package_facts:
|
|
|
|
|
manager: auto
|
|
|
|
|
tags:
|
|
|
|
|
- always
|
|
|
|
|
|
2022-01-07 09:06:18 +00:00
|
|
|
- name: trigger update sysctl
|
2022-01-13 11:27:26 +00:00
|
|
|
shell: /bin/true
|
2022-01-13 11:46:13 +00:00
|
|
|
args:
|
|
|
|
|
warn: false
|
2022-01-13 12:31:18 +00:00
|
|
|
changed_when: true
|
2022-01-07 09:06:18 +00:00
|
|
|
check_mode: false
|
|
|
|
|
notify: update sysctl
|
|
|
|
|
when:
|
|
|
|
|
- rhel9cis_rule_1_6_1 or
|
|
|
|
|
rhel9cis_rule_1_6_2 or
|
|
|
|
|
rhel9cis_rule_3_1_2 or
|
|
|
|
|
rhel9cis_rule_3_1_2 or
|
|
|
|
|
rhel9cis_rule_3_2_1 or
|
|
|
|
|
rhel9cis_rule_3_2_2 or
|
|
|
|
|
rhel9cis_rule_3_2_3 or
|
|
|
|
|
rhel9cis_rule_3_2_4 or
|
|
|
|
|
rhel9cis_rule_3_2_5 or
|
|
|
|
|
rhel9cis_rule_3_2_6 or
|
|
|
|
|
rhel9cis_rule_3_2_7 or
|
|
|
|
|
rhel9cis_rule_3_2_8 or
|
|
|
|
|
rhel9cis_rule_3_2_9
|
|
|
|
|
tags:
|
|
|
|
|
- sysctl
|
|
|
|
|
|
|
|
|
|
- name: trigger update auditd
|
2022-01-13 11:27:26 +00:00
|
|
|
shell: /bin/true
|
2022-01-13 11:46:13 +00:00
|
|
|
args:
|
|
|
|
|
warn: false
|
2022-01-07 09:06:18 +00:00
|
|
|
notify: update auditd
|
2022-01-13 12:31:18 +00:00
|
|
|
changed_when: true
|
2022-01-07 09:06:18 +00:00
|
|
|
check_mode: false
|
|
|
|
|
when:
|
2022-02-02 11:25:03 +00:00
|
|
|
- rhel9cis_rule_4_1_1_1 or
|
|
|
|
|
rhel9cis_rule_4_1_1_2 or
|
|
|
|
|
rhel9cis_rule_4_1_1_3 or
|
|
|
|
|
rhel9cis_rule_4_1_2_1 or
|
|
|
|
|
rhel9cis_rule_4_1_2_2 or
|
|
|
|
|
rhel9cis_rule_4_1_2_3 or
|
|
|
|
|
rhel9cis_rule_4_1_3 or
|
2022-01-07 09:06:18 +00:00
|
|
|
rhel9cis_rule_4_1_4 or
|
|
|
|
|
rhel9cis_rule_4_1_5 or
|
|
|
|
|
rhel9cis_rule_4_1_6 or
|
|
|
|
|
rhel9cis_rule_4_1_7 or
|
|
|
|
|
rhel9cis_rule_4_1_8 or
|
|
|
|
|
rhel9cis_rule_4_1_9 or
|
|
|
|
|
rhel9cis_rule_4_1_10 or
|
|
|
|
|
rhel9cis_rule_4_1_11 or
|
|
|
|
|
rhel9cis_rule_4_1_12
|
|
|
|
|
tags:
|
|
|
|
|
- auditd
|
|
|
|
|
|
|
|
|
|
- name: flush handlers
|
|
|
|
|
meta: flush_handlers
|
|
|
|
|
|
|
|
|
|
- name: Reboot host
|
|
|
|
|
reboot:
|
|
|
|
|
when:
|
2022-02-02 11:25:03 +00:00
|
|
|
- not skip_reboot
|