role_dnsmasq/tasks/configuration.yml

33 lines
795 B
YAML
Raw Normal View History

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:
owner: dnsmasq
group: root
mode: u=rw,g=r,o=r
src: host.conf.j2
dest: /srv/dnsmasq/{{ inventory_hostname }}.conf
become: true
notify: Recharger dnsmasq.service
2023-09-22 15:25:03 +00:00
- name: Déployer le fichier d'hôte en partant de l'inventaire
ansible.builtin.template:
owner: dnsmasq
group: root
mode: u=rw,g=r,o=r
src: hosts.conf.j2
dest: /srv/dnsmasq/ansible_inventory.conf.disabled
become: true
notify: Recharger dnsmasq.service