File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
linux_os/guide/system/software/integrity/crypto/configure_crypto_policy/ansible Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 2020 failed_when : false
2121 check_mode : false
2222
23+ - name : " {{{ rule_title }}} - Get mtime of /etc/crypto-policies/config"
24+ ansible.builtin.stat :
25+ path : /etc/crypto-policies/config
26+ register : config_file_stat
27+ changed_when : false
28+ failed_when : false
29+ check_mode : false
30+
31+ - name : " {{{ rule_title }}} - Get mtime of /etc/crypto-policies/state/current"
32+ ansible.builtin.stat :
33+ path : /etc/crypto-policies/state/current
34+ register : current_file_stat
35+ changed_when : false
36+ failed_when : false
37+ check_mode : false
38+
2339- name : " {{{ rule_title }}} - Verify that Crypto Policy is Set (runtime)"
2440 ansible.builtin.command : /usr/bin/update-crypto-policies --set {{ var_system_crypto_policy }}
25- when : current_crypto_policy.stdout.strip() != var_system_crypto_policy
41+ when : >
42+ (current_crypto_policy.stdout.strip() != var_system_crypto_policy) or
43+ (config_file_stat.stat.exists and current_file_stat.stat.exists and config_file_stat.stat.mtime > current_file_stat.stat.mtime)
You can’t perform that action at this time.
0 commit comments