updated yamllint, company naming, linting and spacing

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2024-12-04 11:45:13 +00:00
parent 1b694832bb
commit 2de8a39cdc
No known key found for this signature in database
GPG key ID: 997FF7FE93AEB5B9
66 changed files with 461 additions and 675 deletions

View file

@ -1,9 +1,7 @@
---
# Post tasks
- name: POST | Gather the package facts after remediation
tags:
- always
tags: always
ansible.builtin.package_facts:
manager: auto
@ -17,7 +15,7 @@
dest: "/etc/sysctl.d/{{ item }}"
owner: root
group: root
mode: '0600'
mode: 'go-rwx'
notify: Reload sysctl
loop:
- 60-kernel_sysctl.conf
@ -29,28 +27,22 @@
ansible.builtin.meta: flush_handlers
- name: POST | reboot system if changes require it and not skipped
tags:
- always
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