only use tsig keys mutually

This commit is contained in:
s3lph 2021-02-06 00:16:19 +01:00
parent 0e587d61e4
commit e12a8f6981

View file

@ -38,7 +38,8 @@ remote:
{% for remote in ( (zones | map(attribute='replicas') ) + (zones | map(attribute='masters') ) ) | flatten | unique %} {% for remote in ( (zones | map(attribute='replicas') ) + (zones | map(attribute='masters') ) ) | flatten | unique %}
- id: remote-{{ remote }} - id: remote-{{ remote }}
{% if knot_tsig_key is defined %} {% if knot_tsig_key is defined and 'knot_tsig_key' in hostvars[remote %}
{# only use TSIG mutually, i.e. if both parties have a key #}
key: {{ knot_tsig_key.name }} key: {{ knot_tsig_key.name }}
{% endif %} {% endif %}
{% for address in hostvars[remote].knot_dns_addresses %} {% for address in hostvars[remote].knot_dns_addresses %}