You've already forked role_dnsmasq
feat: Disable systemd-resolved stub resolver
This commit is contained in:
@@ -1,6 +1,29 @@
|
||||
---
|
||||
# tasks file for dnsmasq
|
||||
|
||||
- name: Create path to override systemd-resolved
|
||||
ansible.builtin.file:
|
||||
path: "{{ dnsmasq_resolved_directory }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rwX,g=rX,o=rX
|
||||
become: true
|
||||
notify: Restart systemd-resolved.service
|
||||
|
||||
- name: Disable stub resolver of systemd-resolved
|
||||
ansible.builtin.template:
|
||||
src: stub-listener.conf.j2
|
||||
dest: "{{ dnsmasq_resolved_directory }}/stub-listener.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=r
|
||||
become: true
|
||||
notify: Restart systemd-resolved.service
|
||||
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Create records directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ dnsmasq_records_directory }}"
|
||||
@@ -24,7 +47,7 @@
|
||||
group: root
|
||||
mode: u=rw,g=r,o=r
|
||||
become: true
|
||||
notify: Reload dnsmasq.service
|
||||
notify: Restart dnsmasq.service
|
||||
|
||||
- name: Deploy specific records
|
||||
ansible.builtin.template:
|
||||
@@ -35,4 +58,4 @@
|
||||
mode: u=rw,g=r,o=r
|
||||
when: dnsmasq_specifics | length > 0
|
||||
become: true
|
||||
notify: Reload dnsmasq.service
|
||||
notify: Restart dnsmasq.service
|
||||
|
@@ -16,7 +16,7 @@
|
||||
- --assumeyes
|
||||
- --idempotent
|
||||
- dnsmasq
|
||||
creates: /sysroot/ostree/repo/refs/heads/rpmostree/pkg/dnsmasq
|
||||
creates: /usr/sbin/dnsmasq
|
||||
when: ansible_facts['pkg_mgr'] == "atomic_container"
|
||||
become: true
|
||||
notify: Apply installation
|
||||
|
@@ -15,4 +15,4 @@
|
||||
loop_control:
|
||||
loop_var: dnsserver
|
||||
run_once: true
|
||||
notify: Reload dnsmasq.service on dns servers
|
||||
notify: Restart dnsmasq.service on dns servers
|
||||
|
Reference in New Issue
Block a user