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