mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
Added option to add a salt, this will allow ansible to idempotently set the password
Signed-off-by: Jeffrey van Pelt <jeff@vanpelt.one>
This commit is contained in:
parent
d08e7380d6
commit
59eca28b3c
2 changed files with 4 additions and 1 deletions
|
|
@ -563,6 +563,9 @@ rhel9cis_selinux_enforce: enforcing
|
|||
# This variable will store the GRUB bootloader password to be stored in '/boot/grub2/user.cfg' file. The default value must be changed.
|
||||
rhel9cis_bootloader_password: password # pragma: allowlist secret
|
||||
|
||||
# Set this value to anything secure to have predictable hashes, which will prevent unnecessary changes
|
||||
rhel9cis_bootloader_salt: ''
|
||||
|
||||
## Control 1.4.1
|
||||
# This variable governs whether a bootloader password should be set in '/boot/grub2/user.cfg' file.
|
||||
rhel9cis_set_boot_pass: true
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
- NIST800-53R5_AC-3
|
||||
ansible.builtin.copy:
|
||||
dest: /boot/grub2/user.cfg
|
||||
content: "GRUB2_PASSWORD={{ rhel9cis_bootloader_password_hash | default(rhel9cis_bootloader_password | grub_hash) }}" # noqa template-instead-of-copy
|
||||
content: "GRUB2_PASSWORD={{ rhel9cis_bootloader_password_hash | default(rhel9cis_bootloader_password | grub_hash(salt=rhel9cis_bootloader_salt)) }}" # noqa template-instead-of-copy
|
||||
owner: root
|
||||
group: root
|
||||
mode: 'go-rwx'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue