refactor: Change records file deployment

This commit is contained in:
pulsar committed 2025-03-30 08:36:09 +02:00
1 parent 02056f9e6f
commit bd8d50c06d
7 files changed
+26 -44

No files matched your search

-16
View File
@@ -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
+4
View File
@@ -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
+2 -2
View File
@@ -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 }}"