2022-10-03 15:20:34 +00:00
|
|
|
---
|
|
|
|
# tasks file for security
|
|
|
|
|
|
|
|
- name: Configurer dnsmasq
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: dnsmasq.conf.j2
|
|
|
|
dest: /etc/dnsmasq.d/cache.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: u=rw,g=r,o=r
|
|
|
|
become: true
|
|
|
|
notify: Recharger dnsmasq.service
|
|
|
|
|
|
|
|
- name: Déployer la configuration de l'instance
|
|
|
|
ansible.builtin.template:
|
2023-09-26 09:12:29 +00:00
|
|
|
src: host.conf.j2
|
|
|
|
dest: /srv/dnsmasq/{{ inventory_hostname }}.conf
|
2022-10-03 15:20:34 +00:00
|
|
|
owner: dnsmasq
|
|
|
|
group: root
|
|
|
|
mode: u=rw,g=r,o=r
|
|
|
|
become: true
|
|
|
|
notify: Recharger dnsmasq.service
|
2023-09-26 09:12:29 +00:00
|
|
|
|
|
|
|
- name: Déployer les configurations specifiques
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: specific.conf.j2
|
|
|
|
dest: "{{ filename }}"
|
|
|
|
owner: dnsmasq
|
|
|
|
group: root
|
|
|
|
mode: u=rw,g=r,o=r
|
|
|
|
when: dnsmasq_specifics | length > 0
|
|
|
|
become: true
|
|
|
|
notify: Recharger dnsmasq.service
|
|
|
|
loop: "{{ dnsmasq_specifics }}"
|
|
|
|
loop_control:
|
|
|
|
label: "{{ filename }}"
|
|
|
|
vars:
|
|
|
|
filename: /srv/dnsmasq/{{ item.hostname }}.conf
|