mirror of
https://github.com/saltstack-formulas/bind-formula.git
synced 2025-04-15 17:20:21 +00:00
Merge pull request #44 from cybacolt/master
allow bind to run in ipv4 or ipv6. if not specified, defaults to bind…
This commit is contained in:
commit
60c7d2b7bb
6 changed files with 36 additions and 0 deletions
|
@ -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:
|
||||
|
|
7
bind/files/debian/default_ipv4
Normal file
7
bind/files/debian/default_ipv4
Normal file
|
@ -0,0 +1,7 @@
|
|||
# run resolvconf?
|
||||
RESOLVCONF=no
|
||||
|
||||
# startup options for the server
|
||||
# force ipv4 only
|
||||
OPTIONS="-4 -u bind"
|
||||
|
7
bind/files/debian/default_ipv6
Normal file
7
bind/files/debian/default_ipv6
Normal file
|
@ -0,0 +1,7 @@
|
|||
# run resolvconf?
|
||||
RESOLVCONF=no
|
||||
|
||||
# startup options for the server
|
||||
# force ipv4 only
|
||||
OPTIONS="-6 -u bind"
|
||||
|
4
bind/files/redhat/default_ipv4
Normal file
4
bind/files/redhat/default_ipv4
Normal file
|
@ -0,0 +1,4 @@
|
|||
# ROOTDIR="/var/named/chroot"
|
||||
# KEYTAB_FILE="/dir/file"
|
||||
# DISABLE_ZONE_CHECKING
|
||||
OPTIONS="-4"
|
4
bind/files/redhat/default_ipv6
Normal file
4
bind/files/redhat/default_ipv6
Normal file
|
@ -0,0 +1,4 @@
|
|||
# ROOTDIR="/var/named/chroot"
|
||||
# KEYTAB_FILE="/dir/file"
|
||||
# DISABLE_ZONE_CHECKING
|
||||
OPTIONS="-6"
|
|
@ -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',
|
||||
|
|
Loading…
Add table
Reference in a new issue