From 4a6642ad458db25d611c7d03933882acac1c273d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Berthaud-M=C3=BCller?= Date: Fri, 16 Jun 2023 11:45:25 +0200 Subject: [PATCH] handle empty secondary --- roles/knot/templates/knot.conf.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/knot/templates/knot.conf.j2 b/roles/knot/templates/knot.conf.j2 index bccadb9..5fbe0f8 100644 --- a/roles/knot/templates/knot.conf.j2 +++ b/roles/knot/templates/knot.conf.j2 @@ -35,9 +35,11 @@ template: journal-content: all dnssec-signing: on dnssec-policy: default +{% if groups.secondary %} notify: [ {{ groups.secondary | map('extract', hostvars) | map(attribute='ansible_hostname') | join(', ') }} ] acl: [ {{ groups.secondary | map('extract', hostvars) | map(attribute='ansible_hostname') | join(', ') }} ] {% endif %} +{% endif %} {% if inventory_hostname in groups.secondary %} master: [ {{ groups.primary | map('extract', hostvars) | map(attribute='ansible_hostname') | join(', ') }} ]