From 1a0c999e10e86944d25ff907d19aeac87eda3140 Mon Sep 17 00:00:00 2001 From: Piotr Pieprzycki Date: Thu, 2 Nov 2017 10:13:02 +0000 Subject: [PATCH 1/2] Added file rndc.conf --- bind/files/debian/rndc.conf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 bind/files/debian/rndc.conf diff --git a/bind/files/debian/rndc.conf b/bind/files/debian/rndc.conf new file mode 100644 index 0000000..3a28a16 --- /dev/null +++ b/bind/files/debian/rndc.conf @@ -0,0 +1,22 @@ +options { + default-key "{{salt['pillar.get']('bind:rndc_client:options:default:key', 'rndc_key') }}"; + default-server "{{salt['pillar.get']('bind:rndc_client:options:default:server', 'localhost') }}"; + default-port {{salt['pillar.get']('bind:rndc_client:options:default:port', '953') }}; +}; + + +server sdns-odc-1.net.onet { key rndc_sdns-odc-1.net.onet; }; + + +{% for key,args in salt['pillar.get']('bind:rndc_client:server', {}).items() -%} +server "{{ key }}" { + key {{ args['key'] }}; +}; +{% endfor %} + +{% for key,args in salt['pillar.get']('bind:keys', {}).items() -%} +key "{{ key }}" { + algorithm {{ args['algorithm'] | default('HMAC-MD5.SIG-ALG.REG.INT') }}; + secret "{{ args['secret'] }}"; +}; +{% endfor %} \ No newline at end of file From aa9fb7b7df10e77db869e2465d118045c0d05bcd Mon Sep 17 00:00:00 2001 From: Piotr Pieprzycki Date: Thu, 2 Nov 2017 14:55:05 +0000 Subject: [PATCH 2/2] delete static config --- bind/files/debian/rndc.conf | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bind/files/debian/rndc.conf b/bind/files/debian/rndc.conf index 3a28a16..1905381 100644 --- a/bind/files/debian/rndc.conf +++ b/bind/files/debian/rndc.conf @@ -5,9 +5,6 @@ options { }; -server sdns-odc-1.net.onet { key rndc_sdns-odc-1.net.onet; }; - - {% for key,args in salt['pillar.get']('bind:rndc_client:server', {}).items() -%} server "{{ key }}" { key {{ args['key'] }}; @@ -19,4 +16,4 @@ key "{{ key }}" { algorithm {{ args['algorithm'] | default('HMAC-MD5.SIG-ALG.REG.INT') }}; secret "{{ args['secret'] }}"; }; -{% endfor %} \ No newline at end of file +{% endfor %}