diff options
author | Emil Renner Berthing <esmil@labitat.dk> | 2023-01-22 01:23:11 +0100 |
---|---|---|
committer | Emil Renner Berthing <esmil@labitat.dk> | 2023-01-24 12:59:29 +0100 |
commit | 1f18da18d3089de1c0c4d98403eccb93d5140b6a (patch) | |
tree | b784c3c00dd435955aed708d81333665f93715ed /roles | |
parent | 0bb864a866a122c047756c6984c6e3c0cafd2147 (diff) | |
download | labitat-ansible-1f18da18d3089de1c0c4d98403eccb93d5140b6a.tar.gz labitat-ansible-1f18da18d3089de1c0c4d98403eccb93d5140b6a.tar.xz labitat-ansible-1f18da18d3089de1c0c4d98403eccb93d5140b6a.zip |
debian: resolved: always use resolved when enabled
Diffstat (limited to 'roles')
-rw-r--r-- | roles/debian/tasks/resolved.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/debian/tasks/resolved.yml b/roles/debian/tasks/resolved.yml index 35c2cf6..f9be27a 100644 --- a/roles/debian/tasks/resolved.yml +++ b/roles/debian/tasks/resolved.yml @@ -27,7 +27,7 @@ - name: Symlink /etc/resolv.conf file: path: '/etc/resolv.conf' - src: '/run/systemd/resolve/resolv.conf' + src: '/lib/systemd/resolv.conf' state: link force: yes when: use_resolved @@ -35,7 +35,7 @@ lineinfile: path: /etc/nsswitch.conf regexp: '^hosts:' - line: 'hosts: files resolve [!UNAVAIL=return] dns myhostname' + line: "hosts: {{ ((ansible_distribution_major_version|int) >= 11)|ternary('resolve','files resolve') }}" when: use_resolved # vim: set ts=2 sw=2 et: |