Skip to content

Commit

Permalink
NOTASK: make systemd-resolved stub resolver optional (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
damex authored Apr 22, 2024
1 parent c25e4a9 commit b6b999c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: damex
name: systemd
version: 1.0.1
version: 1.0.2
readme: README.md
authors:
- Roman Kuzmitskii <[email protected]>
Expand Down
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 b6b999c

Please sign in to comment.