fix config

main
Hannaeko 2021-07-30 12:58:14 +02:00
parent 6bee691284
commit 657ced503c
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@
- name: Generate tsig
become: yes
ansible.builtin.shell:
shell:
cmd: "keymgr -t {{ key_name }} > /etc/knot/{{ key_name }}.key"
creates: "/etc/knot/{{ key_name }}.key"
run_once: True
@ -29,8 +29,8 @@
run_once: True
- name: Populate key to all host
set_facts:
tsig_key_content: {{ tsig_key['content'] | b64decode }}
set_fact:
tsig_key_content: "{{ tsig_key['content'] | b64decode }}"
run_once: True
with_items: "{{ play_hosts }}"
delegate_to: "{{ item }}"

View File

@ -21,7 +21,7 @@ acl:
- id: {{ hostvars[host].ansible_hostname }}
address: [ {{ ( hostvars[host].ansible_all_ipv4_addresses + hostvars[host].ansible_all_ipv6_addresses ) | ansible.netcommon.ipaddr('public') | join(', ') }} ]
action: {% if host in groups.secondary %} transfer {% elif host in groups.primary %} notify {% endif %}
key: {{ key_name }}
{% endfor %}
template: