mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
lint and best practise
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
69e01b84f3
commit
fcf9eb674f
6 changed files with 33 additions and 30 deletions
|
|
@ -29,28 +29,23 @@
|
|||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: POST | reboot system if changes require it and not skipped
|
||||
when: change_requires_reboot
|
||||
tags:
|
||||
- always
|
||||
vars:
|
||||
warn_control_id: Reboot_required
|
||||
block:
|
||||
- name: POST | Reboot system if changes require it and not skipped
|
||||
when: not skip_reboot
|
||||
ansible.builtin.reboot:
|
||||
when:
|
||||
- change_requires_reboot
|
||||
- not skip_reboot
|
||||
|
||||
- name: POST | Warning a reboot required but skip option set
|
||||
when: skip_reboot
|
||||
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
|
||||
- skip_reboot
|
||||
|
||||
- name: "POST | Warning a reboot required but skip option set | warning count"
|
||||
when: skip_reboot
|
||||
ansible.builtin.import_tasks:
|
||||
file: warning_facts.yml
|
||||
when:
|
||||
- change_requires_reboot
|
||||
- skip_reboot
|
||||
vars:
|
||||
warn_control_id: Reboot_required
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue