fix: Deduplicate variable
This commit is contained in:
parent
9481a70c39
commit
8458675875
@ -16,7 +16,7 @@ Liste d'adresses IP auxquelles les requêtes DNS sont transmises si dnsmasq ne p
|
||||
|
||||
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
|
||||
|
||||
### dnsmasq_servers
|
||||
### dnsmasq_hosts
|
||||
|
||||
Liste d'IP ou de noms d'hôtes servant de serveur DNS.
|
||||
|
||||
@ -75,7 +75,7 @@ all:
|
||||
```yaml
|
||||
---
|
||||
|
||||
dnsmasq_servers: "{{ groups['dnsservers'] }}"
|
||||
dnsmasq_hosts: "{{ groups['dnsservers'] }}"
|
||||
```
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ dnsmasq_servers: []
|
||||
dnsmasq_rev_servers: []
|
||||
dnsmasq_bogus_priv_enabled: true
|
||||
|
||||
dnsmasq_servers: []
|
||||
dnsmasq_hosts: []
|
||||
|
||||
dnsmasq_host_ips: []
|
||||
dnsmasq_host_aliases: []
|
||||
|
@ -12,7 +12,7 @@
|
||||
ansible.builtin.systemd:
|
||||
state: reloaded
|
||||
name: dnsmasq.service
|
||||
loop: "{{ dnsmasq_servers }}"
|
||||
loop: "{{ dnsmasq_hosts }}"
|
||||
loop_control:
|
||||
loop_var: dnsserver
|
||||
delegate_to: "{{ dnsserver }}"
|
||||
|
@ -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 }}"
|
||||
|
Loading…
Reference in New Issue
Block a user