diff --git a/galaxy.yml b/galaxy.yml index 6dd937f..0ca231d 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: damex name: systemd -version: 1.0.1 +version: 1.0.2 readme: README.md authors: - Roman Kuzmitskii diff --git a/roles/systemd_resolved/meta/argument_specs.yml b/roles/systemd_resolved/meta/argument_specs.yml index fef3b0b..73fff42 100644 --- a/roles/systemd_resolved/meta/argument_specs.yml +++ b/roles/systemd_resolved/meta/argument_specs.yml @@ -47,6 +47,8 @@ argument_specs: systemd_resolved_dnsstublistener: type: str choices: + - false + - true - tcp - udp systemd_resolved_readetchosts: diff --git a/roles/systemd_resolved/tasks/resolv.conf.yml b/roles/systemd_resolved/tasks/resolv.conf.yml index a8133b6..7090d47 100644 --- a/roles/systemd_resolved/tasks/resolv.conf.yml +++ b/roles/systemd_resolved/tasks/resolv.conf.yml @@ -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