Skip to content

Commit

Permalink
NOTASK: make systemd-resolved stub resolver optional
Browse files Browse the repository at this point in the history
  • Loading branch information
damex committed Apr 22, 2024
1 parent c25e4a9 commit 94d8827
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/systemd_resolved/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ argument_specs:
systemd_resolved_dnsstublistener:
type: str
choices:
- false
- true
- tcp
- udp
systemd_resolved_readetchosts:
Expand Down
10 changes: 10 additions & 0 deletions roles/systemd_resolved/tasks/resolv.conf.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
---
- name: Ensure resolv.conf
ansible.builtin.file:
src: /run/systemd/resolve/resolv.conf
dest: /etc/resolv.conf
state: link
force: true
become: true
when: not systemd_resolved_dnsstublistener

- name: Ensure stub resolv.conf
ansible.builtin.file:
src: /run/systemd/resolve/stub-resolv.conf
dest: /etc/resolv.conf
state: link
force: true
become: true
when: systemd_resolved_dnsstublistener

0 comments on commit 94d8827

Please sign in to comment.