From 0ef75e20f106354b36e97cb75669c6c44cbce6bc Mon Sep 17 00:00:00 2001 From: "tommaso.piccioli" Date: Wed, 10 Jul 2019 12:11:10 +0200 Subject: [PATCH] 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 %} +