update..
This commit is contained in:
@ -90,7 +90,7 @@
|
||||
- caching-nameserver
|
||||
when:
|
||||
- inventory_hostname in groups["gateway_server"]
|
||||
- not file_named_conf_options.stat.exists
|
||||
# - not file_named_conf_options.stat.exists
|
||||
|
||||
# --------------------
|
||||
|
||||
|
@ -1,5 +1,14 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% if bind9_gateway_acl is defined and bind9_gateway_acl|length > 0 %}
|
||||
{% for acl in bind9_gateway_acl %}
|
||||
acl {{ acl.name }} {
|
||||
{% for entry in acl.entries %}
|
||||
{{ entry }};
|
||||
{% endfor %}
|
||||
};
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
acl local-net {
|
||||
127.0.0.0/8;
|
||||
172.16.0.0/12;
|
||||
@ -9,6 +18,7 @@ acl local-net {
|
||||
fe80::/10;
|
||||
::1/128;
|
||||
};
|
||||
{% endif %}
|
||||
|
||||
options {
|
||||
directory "/var/cache/bind";
|
||||
@ -39,24 +49,77 @@ options {
|
||||
version "not currently available";
|
||||
|
||||
// disables all zone transfer requests
|
||||
allow-transfer{"none";};
|
||||
{% if bind9_gateway_allow_transfer is defined and bind9_gateway_allow_transfer|length > 0 %}
|
||||
allow-transfer {
|
||||
{% for item in bind9_gateway_allow_transfer %}
|
||||
{{ item }};
|
||||
{% endfor %}
|
||||
};
|
||||
{% else %}
|
||||
allow-transfer {"none";};
|
||||
{% endif %}
|
||||
{% if bind9_transfer_source is defined and bind9_transfer_source|length > 0 %}
|
||||
transfer-source {{ bind9_transfer_source }} ;
|
||||
{% endif %}
|
||||
{% if bind9_notify_source is defined and bind9_notify_source|length > 0 %}
|
||||
notify-source {{ bind9_notify_source }} ;
|
||||
{% endif %}
|
||||
|
||||
{% if bind9_gateway_listen_on_v6 is defined and bind9_gateway_listen_on_v6|length > 0 %}
|
||||
listen-on-v6 {
|
||||
{% for item in bind9_gateway_listen_on_v6 %}
|
||||
{{ item }};
|
||||
{% endfor %}
|
||||
};
|
||||
{% else %}
|
||||
listen-on-v6 { none; };
|
||||
{% endif %}
|
||||
{% if bind9_gateway_listen_on is defined and bind9_gateway_listen_on|length > 0 %}
|
||||
listen-on {
|
||||
{% for item in bind9_gateway_listen_on %}
|
||||
{{ item }};
|
||||
{% endfor %}
|
||||
};
|
||||
{% else %}
|
||||
listen-on { any; };
|
||||
{% endif %}
|
||||
|
||||
{% if bind9_gateway_allow_query is defined and bind9_gateway_allow_query|length > 0 %}
|
||||
allow-query {
|
||||
local-net;
|
||||
{% for item in bind9_gateway_allow_query %}
|
||||
{{ item }};
|
||||
{% endfor %}
|
||||
};
|
||||
{% else %}
|
||||
allow-query {
|
||||
any;
|
||||
};
|
||||
{% endif %}
|
||||
{% if bind9_gateway_allow_query_cache is defined and bind9_gateway_allow_query_cache|length > 0 %}
|
||||
allow-query-cache {
|
||||
local-net;
|
||||
{% for item in bind9_gateway_allow_query_cache %}
|
||||
{{ item }};
|
||||
{% endfor %}
|
||||
};
|
||||
{% endif %}
|
||||
|
||||
// caching name services
|
||||
{% if bind9_gateway_recursion is defined and bind9_gateway_recursion|bool %}
|
||||
recursion {{ bind9_gateway_recursion }};
|
||||
{% else %}
|
||||
recursion yes;
|
||||
|
||||
{% endif %}
|
||||
{% if bind9_gateway_allow_recursion is defined and bind9_gateway_allow_recursion|length > 0 %}
|
||||
allow-recursion {
|
||||
{% for item in bind9_gateway_allow_recursion %}
|
||||
{{ item }};
|
||||
{% endfor %}
|
||||
};
|
||||
{% else %}
|
||||
allow-recursion {
|
||||
local-net;
|
||||
};
|
||||
{% endif %}
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user