mirror of
https://github.com/saltstack-formulas/bind-formula.git
synced 2025-04-16 17:50:23 +00:00
commit
bd46a18db3
8 changed files with 26 additions and 25 deletions
|
@ -67,17 +67,16 @@ bind_local_config:
|
||||||
- watch_in:
|
- watch_in:
|
||||||
- service: bind
|
- service: bind
|
||||||
|
|
||||||
{% if salt['pillar.get']('bind:config:protocol', False) %}
|
|
||||||
bind_default_config:
|
bind_default_config:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: {{ map.default_config }}
|
- 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
|
- user: root
|
||||||
- group: root
|
- group: root
|
||||||
- mode: 644
|
- mode: 644
|
||||||
- watch_in:
|
- watch_in:
|
||||||
- service: bind_restart
|
- service: bind_restart
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if grains['os_family'] == 'Debian' %}
|
{% if grains['os_family'] == 'Debian' %}
|
||||||
bind_key_config:
|
bind_key_config:
|
||||||
|
|
12
bind/files/debian/default
Normal file
12
bind/files/debian/default
Normal 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(' ') }}"
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
# run resolvconf?
|
|
||||||
RESOLVCONF=no
|
|
||||||
|
|
||||||
# startup options for the server
|
|
||||||
# force ipv4 only
|
|
||||||
OPTIONS="-4 -u bind"
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
# run resolvconf?
|
|
||||||
RESOLVCONF=no
|
|
||||||
|
|
||||||
# startup options for the server
|
|
||||||
# force ipv4 only
|
|
||||||
OPTIONS="-6 -u bind"
|
|
||||||
|
|
9
bind/files/redhat/default
Normal file
9
bind/files/redhat/default
Normal 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(' ') }}"
|
|
@ -1,4 +0,0 @@
|
||||||
# ROOTDIR="/var/named/chroot"
|
|
||||||
# KEYTAB_FILE="/dir/file"
|
|
||||||
# DISABLE_ZONE_CHECKING
|
|
||||||
OPTIONS="-4"
|
|
|
@ -1,4 +0,0 @@
|
||||||
# ROOTDIR="/var/named/chroot"
|
|
||||||
# KEYTAB_FILE="/dir/file"
|
|
||||||
# DISABLE_ZONE_CHECKING
|
|
||||||
OPTIONS="-6"
|
|
|
@ -13,6 +13,9 @@ bind:
|
||||||
options:
|
options:
|
||||||
allow-recursion: '{ any; };' # Never include this on a public resolver
|
allow-recursion: '{ any; };' # Never include this on a public resolver
|
||||||
|
|
||||||
|
# force bind to serve only one IP protocol (ipv4: 4, ipv6: 6). omitting this reverts to binds default of both.
|
||||||
|
protocol: 4
|
||||||
|
|
||||||
bind:
|
bind:
|
||||||
keys:
|
keys:
|
||||||
"core_dhcp":
|
"core_dhcp":
|
||||||
|
|
Loading…
Add table
Reference in a new issue