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*
|
*<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.
|
Liste d'IP ou de noms d'hôtes servant de serveur DNS.
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ all:
|
|||||||
```yaml
|
```yaml
|
||||||
---
|
---
|
||||||
|
|
||||||
dnsmasq_servers: "{{ groups['dnsservers'] }}"
|
dnsmasq_hosts: "{{ groups['dnsservers'] }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ dnsmasq_servers: []
|
|||||||
dnsmasq_rev_servers: []
|
dnsmasq_rev_servers: []
|
||||||
dnsmasq_bogus_priv_enabled: true
|
dnsmasq_bogus_priv_enabled: true
|
||||||
|
|
||||||
dnsmasq_servers: []
|
dnsmasq_hosts: []
|
||||||
|
|
||||||
dnsmasq_host_ips: []
|
dnsmasq_host_ips: []
|
||||||
dnsmasq_host_aliases: []
|
dnsmasq_host_aliases: []
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
state: reloaded
|
state: reloaded
|
||||||
name: dnsmasq.service
|
name: dnsmasq.service
|
||||||
loop: "{{ dnsmasq_servers }}"
|
loop: "{{ dnsmasq_hosts }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: dnsserver
|
loop_var: dnsserver
|
||||||
delegate_to: "{{ dnsserver }}"
|
delegate_to: "{{ dnsserver }}"
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
src: "{{ role_path }}/templates/host.conf.j2"
|
src: "{{ role_path }}/templates/host.conf.j2"
|
||||||
dest: /srv/dnsmasq/{{ dnsmasq_client_filename }}.conf
|
dest: /srv/dnsmasq/{{ dnsmasq_client_filename }}.conf
|
||||||
when:
|
when:
|
||||||
- dnsmasq_servers | length > 0
|
- dnsmasq_hosts | length > 0
|
||||||
- dnsmasq_host_ipv4 not in dnsmasq_servers
|
- dnsmasq_host_ipv4 not in dnsmasq_hosts
|
||||||
loop: "{{ dnsmasq_servers }}"
|
loop: "{{ dnsmasq_hosts }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: dnsserver
|
loop_var: dnsserver
|
||||||
delegate_to: "{{ dnsserver }}"
|
delegate_to: "{{ dnsserver }}"
|
||||||
@ -23,10 +23,10 @@
|
|||||||
path: /srv/dnsmasq/{{ dnsmasq_client_filename }}.conf
|
path: /srv/dnsmasq/{{ dnsmasq_client_filename }}.conf
|
||||||
state: absent
|
state: absent
|
||||||
when:
|
when:
|
||||||
- dnsmasq_servers | length > 0
|
- dnsmasq_hosts | length > 0
|
||||||
- dnsmasq_host_ipv4 not in dnsmasq_servers
|
- dnsmasq_host_ipv4 not in dnsmasq_hosts
|
||||||
tags: [destruction, never]
|
tags: [destruction, never]
|
||||||
loop: "{{ dnsmasq_servers }}"
|
loop: "{{ dnsmasq_hosts }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: dnsserver
|
loop_var: dnsserver
|
||||||
delegate_to: "{{ dnsserver }}"
|
delegate_to: "{{ dnsserver }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user