Commit a5c92346 authored by Guillaume Hervier's avatar Guillaume Hervier Committed by Rafael Monnerat

powerdns: Add port-redirection config file generation

parent ee7823cb
......@@ -92,6 +92,17 @@ recipe = slapos.cookbook:wrapper
command-line = ${powerdns:location}/bin/pdns_control reload --config-dir=$${pdns-directory:configuration}
wrapper-path = $${directory:etc-run}/pdns-reload
# Port redirection
[port-redirection]
<= jinja2-template-base
template = inline:
{%- raw %}
[{"srcPort": 53, "destPort": {{ pdns['port'] }}}]
{% endraw -%}
rendered = $${buildout:directory}/.slapos-port-redirect
extra-context =
section pdns pdns
# Promises
[pdns-promise-listen-port]
recipe = slapos.cookbook:check_port_listening
......@@ -136,6 +147,7 @@ parts =
pdns-configuration-template
pdns-server
pdns-reload
port-redirection
pdns-promise-listen-port
monitor-base
publish-connection-informations
......
......@@ -25,7 +25,7 @@ mode = 0644
[template-powerdns]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-powerdns.cfg
md5sum = 7710007c0bd1817e3c1485ea9ece1e23
md5sum = 8ef7c87e23dd63c945c7e292fef7385d
output = ${buildout:directory}/template-powerdns.cfg
mode = 0644
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment