- templatize default file

- fix config.sls to match
- add example to pillar.example
This commit is contained in:
Rowcliffe Browne 2015-11-02 09:40:51 +08:00
parent 60c7d2b7bb
commit 82f4b63aa9
8 changed files with 26 additions and 25 deletions

View file

@ -67,17 +67,16 @@ bind_local_config:
- watch_in:
- service: bind
{% if salt['pillar.get']('bind:config:protocol', False) %}
bind_default_config:
file.managed:
- name: {{ map.default_config }}
- source: salt://{{ map.config_source_dir }}/default_{{ salt['pillar.get']('bind:config:protocol', 'ipv4') }}
- source: salt://{{ map.config_source_dir }}/default
- template: jinja
- user: root
- group: root
- mode: 644
- watch_in:
- service: bind_restart
{% endif %}
{% if grains['os_family'] == 'Debian' %}
bind_key_config:

12
bind/files/debian/default Normal file
View file

@ -0,0 +1,12 @@
{% set protocol = salt['pillar.get']('bind:config:protocol', False) -%}
{% set param = ['-u bind'] -%}
{% if protocol -%}
{%- param.append('-' + protocol|string) -%}
{% endif -%}
# run resolvconf?
RESOLVCONF=no
# startup options for the server
# force ipv4 only
OPTIONS="{{ param|join(' ') }}"

View file

@ -1,7 +0,0 @@
# run resolvconf?
RESOLVCONF=no
# startup options for the server
# force ipv4 only
OPTIONS="-4 -u bind"

View file

@ -1,7 +0,0 @@
# run resolvconf?
RESOLVCONF=no
# startup options for the server
# force ipv4 only
OPTIONS="-6 -u bind"

View file

@ -0,0 +1,9 @@
{% set protocol = salt['pillar.get']('bind:config:protocol', False) -%}
{% set param = [] -%}
{% if protocol -%}
{%- param.append('-' + protocol|string) -%}
{% endif -%}
# ROOTDIR="/var/named/chroot"
# KEYTAB_FILE="/dir/file"
# DISABLE_ZONE_CHECKING
OPTIONS="{{ param|join(' ') }}"

View file

@ -1,4 +0,0 @@
# ROOTDIR="/var/named/chroot"
# KEYTAB_FILE="/dir/file"
# DISABLE_ZONE_CHECKING
OPTIONS="-4"

View file

@ -1,4 +0,0 @@
# ROOTDIR="/var/named/chroot"
# KEYTAB_FILE="/dir/file"
# DISABLE_ZONE_CHECKING
OPTIONS="-6"

View file

@ -13,6 +13,9 @@ bind:
options:
allow-recursion: '{ any; };' # Never include this on a public resolver
# force bind to serve only one protocol. omitting this reverts to binds default of both.
protocol: 4
bind:
keys:
"core_dhcp":