forked from ansible-lockdown/RHEL9-CIS
section1 v2 initial
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
cf4376f1f7
commit
8b58d71e4b
47 changed files with 2181 additions and 1707 deletions
|
|
@ -1,44 +1,43 @@
|
|||
---
|
||||
|
||||
- name: "1.4.1 | PATCH | Ensure bootloader password is set"
|
||||
ansible.builtin.copy:
|
||||
dest: /boot/grub2/user.cfg
|
||||
content: "GRUB2_PASSWORD={{ rhel9cis_bootloader_password_hash }}" # noqa template-instead-of-copy
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0600'
|
||||
notify: Grub2cfg
|
||||
when:
|
||||
- rhel9cis_set_boot_pass
|
||||
- rhel9cis_rule_1_4_1
|
||||
- rhel9cis_set_boot_pass
|
||||
- rhel9cis_rule_1_4_1
|
||||
tags:
|
||||
- level1-server
|
||||
- level1-workstation
|
||||
- grub
|
||||
- patch
|
||||
- rule_1.4.1
|
||||
- level1-server
|
||||
- level1-workstation
|
||||
- grub
|
||||
- patch
|
||||
- rule_1.4.1
|
||||
ansible.builtin.copy:
|
||||
dest: /boot/grub2/user.cfg
|
||||
content: "GRUB2_PASSWORD={{ rhel9cis_bootloader_password_hash }}" # noqa template-instead-of-copy
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0600'
|
||||
notify: Grub2cfg
|
||||
|
||||
- name: "1.4.2 | PATCH | Ensure permissions on bootloader config are configured"
|
||||
block:
|
||||
- name: "1.4.2 | PATCH | Ensure permissions on bootloader config are configured"
|
||||
ansible.builtin.file:
|
||||
path: "/boot/grub2/{{ item.path }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "{{ item.mode }}"
|
||||
state: touch
|
||||
modification_time: preserve
|
||||
access_time: preserve
|
||||
loop:
|
||||
- { path: 'grub.cfg', mode: '0700' }
|
||||
- { path: 'grubenv', mode: '0600' }
|
||||
- { path: 'user.cfg', mode: '0600' }
|
||||
|
||||
when:
|
||||
- rhel9cis_rule_1_4_2
|
||||
- rhel9cis_rule_1_4_2
|
||||
tags:
|
||||
- level1-server
|
||||
- level1-workstation
|
||||
- grub
|
||||
- patch
|
||||
- rule_1.4.2
|
||||
- level1-server
|
||||
- level1-workstation
|
||||
- grub
|
||||
- patch
|
||||
- rule_1.4.2
|
||||
block:
|
||||
- name: "1.4.2 | PATCH | Ensure permissions on bootloader config are configured"
|
||||
ansible.builtin.file:
|
||||
path: "/boot/grub2/{{ item.path }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "{{ item.mode }}"
|
||||
state: touch
|
||||
modification_time: preserve
|
||||
access_time: preserve
|
||||
loop:
|
||||
- { path: 'grub.cfg', mode: '0700' }
|
||||
- { path: 'grubenv', mode: '0600' }
|
||||
- { path: 'user.cfg', mode: '0600' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue