Configurable variables

This commit is contained in:
135
2023-10-13 12:38:40 +03:00
parent 69be69ebb0
commit 1d34e1324c
5 changed files with 37 additions and 12 deletions

View File

@@ -2,7 +2,9 @@
-- WARNING: auto-generated by Ansible powerdns-recursor role.
--
self = newDS()
self:add{'{{ ansible_hostname }}', '{{ ansible_hostname }}.mm', '{{ ansible_fqdn }}'}
self:add{'{{ ansible_hostname }}', '{{ ansible_fqdn }}'{%- for fqdn in powerdns_recursor__self_add | default([]) %}
{% if loop.first %}, {% endif %}'{{ fqdn }}'{% if not loop.last %}, {% endif %}
{%- endfor %}}
function string.starts(String,Start)
return string.sub(String,1,string.len(Start))==Start

View File

@@ -1,5 +1,8 @@
#
# WARNING: auto-generated by Ansible powerdns-recursor role.
#
mm=172.31.122.10
miranda-media.net=172.31.122.10
{% if forward_lst is defined and forward_lst | length > 0 %}
{% for zone, auth_server in forward_lst.items() %}
{{ zone }}={{ auth_server }}
{% endfor %}
{% endif %}

View File

@@ -6,7 +6,13 @@
-- Note: If you provide your own Lua configuration file, consider
-- running rootkeys.lua too.
dofile("/usr/share/pdns-recursor/lua-config/rootkeys.lua")
-- zoneToCache(".", "url", "https://www.internic.net/domain/root.zone", { refreshPeriod = 0 })
{% if root_cached == 'file' %}
zoneToCache(".", "file", "/etc/powerdns/root.zone", { refreshPeriod = 0 })
addNTA('mm', "private MM domain")
addNTA('miranda-media.net', "fix DNSSEC issue for MM domain")
{% else %}
zoneToCache(".", "url", "https://www.internic.net/domain/root.zone", { refreshPeriod = 0 })
{% endif %}
{% if nta_lst is defined and nta_lst | length > 0 %}
{% for zone, description in nta_lst.items() %}
addNTA("{{ zone }}", "{{ description }}")
{% endfor %}
{% endif %}