mirror of
https://github.com/saltstack-formulas/bind-formula.git
synced 2025-04-16 17:50:23 +00:00
Added feature rndc clinet
This commit is contained in:
parent
99593ccc8c
commit
978ce84b15
3 changed files with 31 additions and 3 deletions
|
@ -147,6 +147,20 @@ bind_logging_config:
|
||||||
- watch_in:
|
- watch_in:
|
||||||
- service: bind
|
- service: bind
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- if salt['pillar.get']('bind:rndc_client', False) %}
|
||||||
|
bind_rndc_client_config:
|
||||||
|
file.managed:
|
||||||
|
- name: {{ map.rndc_client_config }}
|
||||||
|
- source: salt://{{ map.config_source_dir }}/rndc.conf
|
||||||
|
- template: jinja
|
||||||
|
- user: {{ salt['pillar.get']('bind:config:user', map.user) }}
|
||||||
|
- group: {{ salt['pillar.get']('bind:config:group', map.group) }}
|
||||||
|
- mode: {{ salt['pillar.get']('bind:config:mode', '640') }}
|
||||||
|
- context:
|
||||||
|
map: {{ map }}
|
||||||
|
- require:
|
||||||
|
- pkg: bind
|
||||||
|
{%- endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for zone, zone_data in salt['pillar.get']('bind:configured_zones', {}).items() -%}
|
{% for zone, zone_data in salt['pillar.get']('bind:configured_zones', {}).items() -%}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
'default_config': '/etc/default/bind9',
|
'default_config': '/etc/default/bind9',
|
||||||
'default_zones_config': '/etc/bind/named.conf.default-zones',
|
'default_zones_config': '/etc/bind/named.conf.default-zones',
|
||||||
'logging_config': '/etc/bind/named.conf.logging',
|
'logging_config': '/etc/bind/named.conf.logging',
|
||||||
|
'rndc_client_config': '/etc/bind/rndc.conf',
|
||||||
'named_directory': '/var/cache/bind/zones',
|
'named_directory': '/var/cache/bind/zones',
|
||||||
'log_dir': '/var/log/bind9',
|
'log_dir': '/var/log/bind9',
|
||||||
'log_mode': '644',
|
'log_mode': '644',
|
||||||
|
|
|
@ -130,7 +130,6 @@ bind:
|
||||||
print-time: yes
|
print-time: yes
|
||||||
print-category: yes
|
print-category: yes
|
||||||
print-severity: yes
|
print-severity: yes
|
||||||
syslog: dynamic
|
|
||||||
severity: info
|
severity: info
|
||||||
category:
|
category:
|
||||||
default:
|
default:
|
||||||
|
@ -209,8 +208,22 @@ bind:
|
||||||
query-errors:
|
query-errors:
|
||||||
- query-errors_log
|
- query-errors_log
|
||||||
|
|
||||||
controls:
|
rndc_client: # Generate rndc.conf file it uses previously defined keys
|
||||||
local:
|
options:
|
||||||
|
default:
|
||||||
|
server: localhost
|
||||||
|
port: 953
|
||||||
|
key: my_default_key
|
||||||
|
server:
|
||||||
|
'127.0.0.1':
|
||||||
|
key: dns_key
|
||||||
|
'localhost':
|
||||||
|
key: dns_key
|
||||||
|
'8.8.8.8':
|
||||||
|
key: my_default_key
|
||||||
|
|
||||||
|
controls: # If you define controls then you also should configure rndc_client
|
||||||
|
local:
|
||||||
enabled: true
|
enabled: true
|
||||||
bind:
|
bind:
|
||||||
address: 127.0.0.1
|
address: 127.0.0.1
|
||||||
|
|
Loading…
Add table
Reference in a new issue