Skip to content

Commit c44804c

Browse files
committed
feat(named.conf.local.jinja): Allow "allow-update" to have multiple elements
This allows to have multiple keys or a mix of keys and IP ...
1 parent c3b1fb4 commit c44804c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Diff for: bind/files/named.conf.local.jinja

+6-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ zone "{{ key }}" {
4646
inline-signing yes;
4747
{%- endif %}
4848
{%- if args['allow-update'] is defined %}
49-
allow-update { {{ args['allow-update'] }}; };
49+
{%- if args['allow-update'] is string %}
50+
{%- set allow_update = [args['allow-update']] %}
51+
{%- else %}
52+
{%- set allow_update = args['allow-update'] %}
53+
{%- endif %}
54+
allow-update { {{ allow_update | join('; ') }}; };
5055
{%- endif %}
5156
{%- if args.update_policy is defined %}
5257
update-policy {

Diff for: pillar.example

+3-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ bind:
261261

262262
dynamic.domain.com: # Our ddns zone
263263
type: master # As above
264-
allow-update: "key core_dhcp" # Who we allow updates from (refers to above key)
264+
allow-update:
265+
- "key core_dhcp" # Who we allow updates, could be a string or an array
266+
- "key other_dhcp"
265267
notify: true # Notify NS RRs of changes
266268

267269
sub.anotherdomain.com: # Another domain zone

0 commit comments

Comments
 (0)