You've already forked role_dnsmasq
refactor: Change records file deployment
This commit is contained in:
@@ -35,19 +35,3 @@
|
||||
mode: u=rw,g=r,o=r
|
||||
become: true
|
||||
notify: Reload dnsmasq.service
|
||||
|
||||
- name: Deploy specific configuration
|
||||
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: Reload dnsmasq.service
|
||||
loop: "{{ dnsmasq_specifics }}"
|
||||
loop_control:
|
||||
label: "{{ filename }}"
|
||||
vars:
|
||||
filename: /srv/dnsmasq/{{ item.hostname }}.conf
|
||||
|
@@ -8,3 +8,7 @@
|
||||
- name: Import configuration tasks
|
||||
ansible.builtin.import_tasks:
|
||||
file: configuration.yml
|
||||
|
||||
- name: Import records deployment tasks
|
||||
ansible.builtin.import_tasks:
|
||||
file: records.yml
|
||||
|
@@ -3,11 +3,11 @@
|
||||
|
||||
- name: Deploy records
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/auto.conf.j2"
|
||||
dest: /srv/dnsmasq/auto-{{ dnsmasq_ansible_group }}.conf
|
||||
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 }}"
|
Reference in New Issue
Block a user