inventoryFromAnsible #4

Merged
pulsar merged 10 commits from inventoryFromAnsible into master 2024-05-06 18:48:20 +00:00
4 changed files with 10 additions and 10 deletions
Showing only changes of commit 8458675875 - Show all commits

View File

@ -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'] }}"
```

View File

@ -6,7 +6,7 @@ dnsmasq_servers: []
dnsmasq_rev_servers: []
dnsmasq_bogus_priv_enabled: true
dnsmasq_servers: []
dnsmasq_hosts: []
dnsmasq_host_ips: []
dnsmasq_host_aliases: []

View File

@ -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 }}"

View File

@ -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 }}"