2022-11-17 10:02:05 +01:00
|
|
|
---
|
2022-11-17 10:44:17 +01:00
|
|
|
- name: Ensure systemd-resolved doesn't interfere
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: /etc/systemd/resolved.conf
|
|
|
|
regexp: '^DNSStubListener='
|
|
|
|
insertafter: '^[Resolve]'
|
|
|
|
line: DNSStubListener=no
|
|
|
|
|
|
|
|
- name: Restart systemd-resolved service
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: systemd-resolved
|
|
|
|
state: restarted
|
|
|
|
|
2022-11-17 10:02:05 +01:00
|
|
|
- name: Install dnsmasq
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name: dnsmasq
|
|
|
|
state: latest
|
|
|
|
update_cache: true
|
|
|
|
|
|
|
|
- name: Enable dnsmasq service
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: dnsmasq
|
|
|
|
state: started
|
|
|
|
|
|
|
|
- name: Start dnsmasq service
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: dnsmasq
|
|
|
|
enabled: true
|