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..b7eb1484 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 unbound_remote_IP is defined %} + control-interface: '{{ unbound_remote_IP }}' +{% endif %} +