mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 14:23:05 +00:00
Improved logic for crypto policy additions
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
49fdafc5e0
commit
d5b688caac
3 changed files with 42 additions and 24 deletions
|
|
@ -38,14 +38,13 @@
|
|||
|
||||
- name: Update Crypto Policy
|
||||
ansible.builtin.set_fact:
|
||||
rhel9cis_full_crypto_policy: "{{ rhel9cis_crypto_policy }}{% if rhel9cis_crypto_policy_module | length > 0 %}:{{ rhel9cis_crypto_policy_module }}{% endif %}"
|
||||
rhel9cis_full_crypto_policy: "{{ rhel9cis_crypto_policy }}{% if rhel9cis_crypto_policy_module | length > 0 %}{{ rhel9cis_crypto_policy_module }}{% endif %}"
|
||||
notify: Set Crypto Policy
|
||||
|
||||
- name: Set Crypto Policy
|
||||
when: prelim_system_wide_crypto_policy.stdout != rhel9cis_full_crypto_policy
|
||||
ansible.builtin.shell: |
|
||||
update-crypto-policies --set "{{ rhel9cis_full_crypto_policy }}"
|
||||
update-crypto-policies
|
||||
notify:
|
||||
- Change_requires_reboot
|
||||
- Restart sshd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue