Skip to content

Commit

Permalink
Enable and start systemd-resolved sooner
Browse files Browse the repository at this point in the history
We must start the service to populate the files in
/run/systemd/resolve/, before we can create the /etc/resolv.conf.
  • Loading branch information
jsf9k committed May 3, 2024
1 parent 6b5a0d8 commit 4c97295
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
name:
- systemd-resolved

- name: Enable and start systemd-resolved
ansible.builtin.service:
enabled: true
name: systemd-resolved.service
# We must start the service to populate the files in
# /run/systemd/resolve/, which we need when we create a symlink
# below.
state: started

- name: Ensure resolvconf is not installed
ansible.builtin.package:
name:
Expand All @@ -21,8 +30,3 @@
path: /etc/resolv.conf
src: /run/systemd/resolve/stub-resolv.conf
state: link

- name: Enable systemd-resolved
ansible.builtin.service:
enabled: true
name: systemd-resolved.service

0 comments on commit 4c97295

Please sign in to comment.