allow bind to run in ipv4 or ipv6. if not specified, defaults to bind's default of both.

This commit is contained in:
Rowcliffe Browne 2015-10-30 18:28:43 +08:00
parent f9010c4fca
commit ed7aead85c
6 changed files with 36 additions and 0 deletions

View file

@ -67,6 +67,18 @@ 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') }}
- user: root
- group: root
- mode: 644
- watch_in:
- service: bind_restart
{% endif %}
{% if grains['os_family'] == 'Debian' %}
bind_key_config:
file.managed:

View file

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

View file

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

View file

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

View file

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

View file

@ -8,6 +8,7 @@
'local_config': '/etc/bind/named.conf.local',
'key_config': '/etc/bind/named.conf.key',
'options_config': '/etc/bind/named.conf.options',
'default_config': '/etc/default/bind9',
'default_zones_config': '/etc/bind/named.conf.default-zones',
'named_directory': '/var/cache/bind/zones',
'log_dir': '/var/log/bind9',
@ -22,6 +23,7 @@
'zones_source_dir': '/srv/salt/zones',
'config': '/etc/named.conf',
'local_config': '/etc/named.conf.local',
'default_config': '/etc/sysconfig/named',
'named_directory': '/var/named/data',
'log_dir': '/var/log/named',
'user': 'root',