Skip to content

Commit

Permalink
feat(named.conf.local.jinja): Allow "allow-update" to have multiple e…
Browse files Browse the repository at this point in the history
…lements

This allows to have multiple keys or a mix of keys and IP ...
  • Loading branch information
ekacnet committed Nov 30, 2022
1 parent c3b1fb4 commit c44804c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion bind/files/named.conf.local.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ zone "{{ key }}" {
inline-signing yes;
{%- endif %}
{%- if args['allow-update'] is defined %}
allow-update { {{ args['allow-update'] }}; };
{%- if args['allow-update'] is string %}
{%- set allow_update = [args['allow-update']] %}
{%- else %}
{%- set allow_update = args['allow-update'] %}
{%- endif %}
allow-update { {{ allow_update | join('; ') }}; };
{%- endif %}
{%- if args.update_policy is defined %}
update-policy {
Expand Down
4 changes: 3 additions & 1 deletion pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ bind:

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

sub.anotherdomain.com: # Another domain zone
Expand Down

0 comments on commit c44804c

Please sign in to comment.