File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
linux_os/guide/system/software/integrity/crypto/configure_crypto_policy/ansible Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1313 state : present
1414{{% endif %}}
1515
16- - name : " {{{ rule_title }}}"
16+ - name : " {{{ rule_title }}} - Set Crypto Policy "
1717 ansible.builtin.lineinfile :
1818 path : /etc/crypto-policies/config
1919 regexp : ' ^(?!#)(\S+)$'
2020 line : " {{ var_system_crypto_policy }}"
2121 create : yes
2222
23+ - name : " {{{ rule_title }}} - Check current crypto policy (runtime)"
24+ ansible.builtin.command : /usr/bin/update-crypto-policies --show
25+ register : current_crypto_policy
26+ changed_when : false
27+ failed_when : false
28+ check_mode : false
29+
2330- name : Verify that Crypto Policy is Set (runtime)
2431 ansible.builtin.command : /usr/bin/update-crypto-policies --set {{ var_system_crypto_policy }}
32+ when : current_crypto_policy.stdout.strip() != var_system_crypto_policy
You can’t perform that action at this time.
0 commit comments