forked from ansible-lockdown/RHEL9-CIS
lint updates
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
3ead0d63ac
commit
acf0104f7a
34 changed files with 199 additions and 213 deletions
|
|
@ -2,25 +2,25 @@
|
|||
# Post tasks
|
||||
|
||||
- name: Perform DNF package cleanup
|
||||
dnf:
|
||||
ansible.builtin.package:
|
||||
autoremove: true
|
||||
changed_when: false
|
||||
|
||||
- name: Gather the package facts after remediation
|
||||
package_facts:
|
||||
ansible.builtin.package_facts:
|
||||
manager: auto
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: update sysctl
|
||||
template:
|
||||
- name: Update sysctl
|
||||
ansible.builtin.template:
|
||||
src: "etc/sysctl.d/{{ item }}.j2"
|
||||
dest: "/etc/sysctl.d/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0600
|
||||
register: sysctl_updated
|
||||
notify: reload sysctl
|
||||
notify: Reload sysctl
|
||||
with_items:
|
||||
- 60-kernel_sysctl.conf
|
||||
- 60-disable_ipv6.conf
|
||||
|
|
@ -31,29 +31,29 @@
|
|||
- not system_is_container
|
||||
- "'procps-ng' in ansible_facts.packages"
|
||||
|
||||
- name: flush handlers
|
||||
meta: flush_handlers
|
||||
- name: Flush handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: POST | reboot system if changes require it and not skipped
|
||||
block:
|
||||
- name: POST | Reboot system if changes require it and not skipped
|
||||
reboot:
|
||||
ansible.builtin.reboot:
|
||||
when:
|
||||
- change_requires_reboot
|
||||
- Change_requires_reboot
|
||||
- not skip_reboot
|
||||
|
||||
- name: POST | Warning a reboot required but skip option set
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
msg: "Warning!! changes have been made that require a reboot to be implemented but skip reboot was set - Can affect compliance check results"
|
||||
changed_when: true
|
||||
when:
|
||||
- change_requires_reboot
|
||||
- Change_requires_reboot
|
||||
- skip_reboot
|
||||
|
||||
- name: "POST | Warning a reboot required but skip option set | warning count"
|
||||
ansible.builtin.import_tasks: warning_facts.yml
|
||||
when:
|
||||
- change_requires_reboot
|
||||
- Change_requires_reboot
|
||||
- skip_reboot
|
||||
vars:
|
||||
warn_control_id: Reboot_required
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue