1
0
Fork 0
forked from infra/ansible

dns: only set crypto-policy on rhel9 dns servers, 10 does not have that policy

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2026-05-20 14:44:21 -07:00
commit 4262b3610f

View file

@ -29,7 +29,7 @@
- name: Set crypto-policy on RHEL9 dns servers to DEFAULT:SHA1
ansible.builtin.command: "update-crypto-policies --set DEFAULT:SHA1"
when: "inventory_hostname.startswith('ns') and (currentcryptopolicy.stdout.find('DEFAULT:SHA1') == -1 or cryptopolicyapplied.rc != 0)"
when: "inventory_hostname.startswith('ns') and (currentcryptopolicy.stdout.find('DEFAULT:SHA1') == -1 and (ansible_distribution_major_version|int == 9) or cryptopolicyapplied.rc != 0)"
check_mode: no
tags:
- crypto-policies