mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2026-03-25 22:37:11 +00:00
updated logic to allow manual hash to be added or filter
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
f1786fe20f
commit
9b091984db
2 changed files with 5 additions and 1 deletions
|
|
@ -569,6 +569,10 @@ rhel9cis_selinux_enforce: enforcing
|
||||||
# This variable governs whether a bootloader password should be set in '/boot/grub2/user.cfg' file.
|
# This variable governs whether a bootloader password should be set in '/boot/grub2/user.cfg' file.
|
||||||
rhel9cis_set_boot_pass: false
|
rhel9cis_set_boot_pass: false
|
||||||
|
|
||||||
|
# Either set rhel9cis_bootloader_password_hash or rhel9cis_bootloader_password and rhel9cis_bootloader_salt
|
||||||
|
# If you are not using the bootloader hash filter you can set it here if the encrypted format e.g. grub.pbkdf2.sha512.hashstring
|
||||||
|
rhel9cis_bootloader_password_hash: 'grub.pbkdf2.sha512.changethispassword' # pragma: allowlist secret
|
||||||
|
|
||||||
# This variable will store the GRUB bootloader password to be stored in '/boot/grub2/user.cfg' file. The default value must be changed.
|
# 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
|
rhel9cis_bootloader_password: 'password' # pragma: allowlist secret
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
- rhel9cis_rule_1_4_1
|
- rhel9cis_rule_1_4_1
|
||||||
tags: always
|
tags: always
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that: rhel9cis_bootloader_password != 'password' # pragma: allowlist secret
|
that: rhel9cis_bootloader_password_hash != 'grub.pbkdf2.sha512.changethispassword' or (rhel9cis_bootloader_salt != '' and rhel9cis_bootloader_password != 'password') # pragma: allowlist secret
|
||||||
msg: "This role will not be able to run single user password commands as rhel9cis_bootloader_password variable has not been set correctly"
|
msg: "This role will not be able to run single user password commands as rhel9cis_bootloader_password variable has not been set correctly"
|
||||||
|
|
||||||
- name: "Check crypto-policy module input"
|
- name: "Check crypto-policy module input"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue