Compare commits
2 Commits
80e434b94b
...
64f51a69b5
Author | SHA1 | Date | |
---|---|---|---|
64f51a69b5 | |||
de523dd8df |
@ -28,10 +28,14 @@ nsd-config-zones-file-directory:
|
||||
"{{ identifier }}":
|
||||
file.managed:
|
||||
- name: "{{ nsd.zones_dir }}/{{ zonefile_name(name, config) }}"
|
||||
{%- if 'zone_source' in config %}
|
||||
- source: {{ config['zone_source'] }}
|
||||
{%- else %}
|
||||
- source: {{ files_switch([template, template+'.jinja'],
|
||||
lookup=identifier
|
||||
)
|
||||
}}
|
||||
{%- endif %}
|
||||
- mode: 644
|
||||
- user: root
|
||||
- group: {{ nsd.rootgroup }}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{%- from "nsd/macros.jinja" import zonefile_name with context -%}
|
||||
{%- set extraopts = ['allow-notify', 'request-xfr', 'outgoing-interface'] -%}
|
||||
########################################################################
|
||||
# File managed by Salt at <{{ source }}>.
|
||||
# Your changes will be overwritten.
|
||||
@ -8,4 +9,9 @@
|
||||
zone:
|
||||
name: "{{ name }}"
|
||||
zonefile: "{{ nsd.zones_dir }}/{{ zonefile_name(name, config) }}"
|
||||
{%- for option in extraopts %}
|
||||
{%- if option in config %}
|
||||
{{ option }}: "{{ config[option] }}"
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endfor %}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{%- for category, config in nsd.get('config_data').items() %}
|
||||
{{ category }}:
|
||||
{%- for option, value in config.items() %}
|
||||
{%- if value is string %}
|
||||
{%- if value is string or value is number %}
|
||||
{{ option }}: {{ value }}
|
||||
{%- elif value is iterable %}
|
||||
{%- for item in value %}
|
||||
|
@ -31,6 +31,11 @@ nsd:
|
||||
"168.192.in-addr.arpa": {}
|
||||
# NSD's include-pattern directive may be a better way to share configuration
|
||||
# across zones than using YAML anchors.
|
||||
#
|
||||
# You can load the zone file from a custom source and specify additional configuration options:
|
||||
# example.com:
|
||||
# zone_source: salt://zones/example.com.zone
|
||||
# request-xfr: 192.168.0.1
|
||||
|
||||
# If this section is present in your Pillar data,
|
||||
# nsd.conf.d/10-salt.conf will be created and managed
|
||||
@ -38,6 +43,10 @@ nsd:
|
||||
server:
|
||||
hide-version: 'yes'
|
||||
ip-address: 127.0.0.1
|
||||
# to use an option multiple times, make it a list:
|
||||
# ip-address:
|
||||
# - 127.0.0.1
|
||||
# - 192.168.0.1
|
||||
verbosity: 2
|
||||
port: 53530
|
||||
remote-control:
|
||||
|
Loading…
x
Reference in New Issue
Block a user