You've already forked role_dnsmasq
fix: Deduplicate variable
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
src: "{{ role_path }}/templates/host.conf.j2"
|
||||
dest: /srv/dnsmasq/{{ dnsmasq_client_filename }}.conf
|
||||
when:
|
||||
- dnsmasq_servers | length > 0
|
||||
- dnsmasq_host_ipv4 not in dnsmasq_servers
|
||||
loop: "{{ dnsmasq_servers }}"
|
||||
- dnsmasq_hosts | length > 0
|
||||
- dnsmasq_host_ipv4 not in dnsmasq_hosts
|
||||
loop: "{{ dnsmasq_hosts }}"
|
||||
loop_control:
|
||||
loop_var: dnsserver
|
||||
delegate_to: "{{ dnsserver }}"
|
||||
@@ -23,10 +23,10 @@
|
||||
path: /srv/dnsmasq/{{ dnsmasq_client_filename }}.conf
|
||||
state: absent
|
||||
when:
|
||||
- dnsmasq_servers | length > 0
|
||||
- dnsmasq_host_ipv4 not in dnsmasq_servers
|
||||
- dnsmasq_hosts | length > 0
|
||||
- dnsmasq_host_ipv4 not in dnsmasq_hosts
|
||||
tags: [destruction, never]
|
||||
loop: "{{ dnsmasq_servers }}"
|
||||
loop: "{{ dnsmasq_hosts }}"
|
||||
loop_control:
|
||||
loop_var: dnsserver
|
||||
delegate_to: "{{ dnsserver }}"
|
||||
|
Reference in New Issue
Block a user