role_dnsmasq/tasks/client.yml

18 lines
452 B
YAML

---
# tasks file for security
- name: Deploy records
ansible.builtin.template:
owner: dnsmasq
group: root
mode: u=rw,g=r,o=r
src: "{{ role_path }}/templates/auto.conf.j2"
dest: /srv/dnsmasq/auto_{{ dnsmasq_ansible_group }}.conf
when: dnsmasq_hosts | length > 0
become: true
delegate_to: "{{ dnsserver }}"
loop: "{{ dnsmasq_hosts }}"
loop_control:
loop_var: dnsserver
notify: Reload dnsmasq.service on dns servers