2023-10-25 22:26:17 +02:00
|
|
|
---
|
|
|
|
- name: Make sure systemd-resolved is running
|
2023-11-29 12:22:34 +01:00
|
|
|
become: true
|
2023-10-25 22:26:17 +02:00
|
|
|
ansible.builtin.systemd:
|
|
|
|
state: started
|
|
|
|
masked: false
|
|
|
|
name: systemd-resolved
|
|
|
|
|
|
|
|
- name: template /etc/systemd/resolved.conf
|
2023-11-29 12:22:34 +01:00
|
|
|
become: true
|
2023-10-25 22:26:17 +02:00
|
|
|
ansible.builtin.template:
|
|
|
|
src: resolved.conf.j2
|
|
|
|
dest: /etc/systemd/resolved.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0644"
|
|
|
|
notify: restart systemd-resolved
|
|
|
|
|
|
|
|
- name: template /etc/resolv.conf
|
2023-11-29 12:22:34 +01:00
|
|
|
become: true
|
2023-10-25 22:26:17 +02:00
|
|
|
ansible.builtin.template:
|
|
|
|
src: resolv.conf.j2
|
|
|
|
dest: /etc/resolv.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0644"
|
|
|
|
notify: restart systemd-resolved
|