Skip to content
Permalink
Browse files

[debops.dnsmasq] Change 'rebind-domain-ok' config

Don't set 'rebind-domain-ok' parameters in 'dnsmasq' when the domain is
not defined (empty).
  • Loading branch information...
drybjed committed Aug 10, 2019
1 parent 1ebd4f7 commit 57b74198c0fdf92f56ad4f54687ca28573424a5b
Showing with 5 additions and 1 deletion.
  1. +5 −1 ansible/roles/debops.dnsmasq/defaults/main.yml
@@ -352,7 +352,10 @@ dnsmasq__default_configuration:
maintaining the leases.
option: 'rebind-domain-ok'
value: '{{ dnsmasq__base_domain }}'
state: '{{ "present" if dnsmasq__base_domain_rebind_ok|bool else "init" }}'
state: '{{ "present"
if (dnsmasq__base_domain_rebind_ok|bool and
dnsmasq__base_domain|d())
else "absent" }}'

- name: 'rebind-parent-domain-ok'
comment: |
@@ -363,6 +366,7 @@ dnsmasq__default_configuration:
value: '{{ dnsmasq__base_domain.split(".")[1:] | join(".") }}'
state: '{{ "present"
if (dnsmasq__base_domain_rebind_ok|bool and
dnsmasq__base_domain|d() and
(dnsmasq__base_domain.split(".") | length >= 4))
else "absent" }}'

0 comments on commit 57b7419

Please sign in to comment.
You can’t perform that action at this time.