From 0ef75e20f106354b36e97cb75669c6c44cbce6bc Mon Sep 17 00:00:00 2001 From: "tommaso.piccioli" Date: Wed, 10 Jul 2019 12:11:10 +0200 Subject: [PATCH 1/3] allow remote control from localhost --- library/roles/unbound-resolver/defaults/main.yml | 3 ++- .../unbound-resolver/templates/unbound-remote-control.conf | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/library/roles/unbound-resolver/defaults/main.yml b/library/roles/unbound-resolver/defaults/main.yml index 8bbe8970..ab3782f0 100644 --- a/library/roles/unbound-resolver/defaults/main.yml +++ b/library/roles/unbound-resolver/defaults/main.yml @@ -16,4 +16,5 @@ unbound_prefetch: 'yes' unbound_verbosity: 1 unbound_threads: '{{ ansible_processor_count }}' -unbound_remote_control: 'no' +unbound_remote_control: 'yes' +unbound_remote_IP: '127.0.0.1' diff --git a/library/roles/unbound-resolver/templates/unbound-remote-control.conf b/library/roles/unbound-resolver/templates/unbound-remote-control.conf index 42b29b9d..ff3857cd 100644 --- a/library/roles/unbound-resolver/templates/unbound-remote-control.conf +++ b/library/roles/unbound-resolver/templates/unbound-remote-control.conf @@ -1,2 +1,6 @@ remote-control: control-enable: {{ unbound_remote_control }} +{% if unbount_remove_IP is defined %} + control-interface: '{{ unbount_remove_IP }}' +{% endif %} + From f3651be98ddaf4189f22903b4d12ff341578bd34 Mon Sep 17 00:00:00 2001 From: "tommaso.piccioli" Date: Wed, 10 Jul 2019 12:53:15 +0200 Subject: [PATCH 2/3] minor fix --- .../unbound-resolver/templates/unbound-remote-control.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/roles/unbound-resolver/templates/unbound-remote-control.conf b/library/roles/unbound-resolver/templates/unbound-remote-control.conf index ff3857cd..bf668bba 100644 --- a/library/roles/unbound-resolver/templates/unbound-remote-control.conf +++ b/library/roles/unbound-resolver/templates/unbound-remote-control.conf @@ -1,6 +1,6 @@ remote-control: control-enable: {{ unbound_remote_control }} -{% if unbount_remove_IP is defined %} - control-interface: '{{ unbount_remove_IP }}' +{% if unbount_remote_IP is defined %} + control-interface: '{{ unbount_remote_IP }}' {% endif %} From 9d9f380ebf2dbd02306d97bb9ada639bbce9ee41 Mon Sep 17 00:00:00 2001 From: "tommaso.piccioli" Date: Wed, 10 Jul 2019 13:05:44 +0200 Subject: [PATCH 3/3] variable name fix --- .../unbound-resolver/templates/unbound-remote-control.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/roles/unbound-resolver/templates/unbound-remote-control.conf b/library/roles/unbound-resolver/templates/unbound-remote-control.conf index bf668bba..b7eb1484 100644 --- a/library/roles/unbound-resolver/templates/unbound-remote-control.conf +++ b/library/roles/unbound-resolver/templates/unbound-remote-control.conf @@ -1,6 +1,6 @@ remote-control: control-enable: {{ unbound_remote_control }} -{% if unbount_remote_IP is defined %} - control-interface: '{{ unbount_remote_IP }}' +{% if unbound_remote_IP is defined %} + control-interface: '{{ unbound_remote_IP }}' {% endif %}