Skip to content

Commit 0b39aab

Browse files
committed
Enable and start systemd-resolved sooner
We must start the service to populate the files in /run/systemd/resolve/, before we can create the /etc/resolv.conf.
1 parent 019139b commit 0b39aab

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

tasks/main.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
name:
55
- systemd-resolved
66

7+
- name: Enable and start systemd-resolved
8+
ansible.builtin.service:
9+
enabled: true
10+
name: systemd-resolved.service
11+
# We must start the service to populate the files in
12+
# /run/systemd/resolve/, which we need when we create a symlink
13+
# below.
14+
state: started
15+
716
- name: Ensure resolvconf is not installed
817
ansible.builtin.package:
918
name:
@@ -21,8 +30,3 @@
2130
path: /etc/resolv.conf
2231
src: /run/systemd/resolve/stub-resolv.conf
2332
state: link
24-
25-
- name: Enable systemd-resolved
26-
ansible.builtin.service:
27-
enabled: true
28-
name: systemd-resolved.service

0 commit comments

Comments
 (0)