From de039416db3ec6241f36338ad864322fbb08422d Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Fri, 17 Nov 2017 17:15:25 +0100 Subject: space_server: avahi: use mdns_minimal to resolve .local --- roles/space_server/tasks/avahi.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'roles') diff --git a/roles/space_server/tasks/avahi.yml b/roles/space_server/tasks/avahi.yml index 9520b08..8390de4 100644 --- a/roles/space_server/tasks/avahi.yml +++ b/roles/space_server/tasks/avahi.yml @@ -8,6 +8,13 @@ tags: - packages +- name: Install nss-mdns package + dnf: + name: nss-mdns + state: latest + tags: + - packages + - name: Configure avahi-daemon ini_file: path: /etc/avahi/avahi-daemon.conf @@ -83,4 +90,10 @@ creates: '/etc/systemd/system/multi-user.target.wants/avahi-daemon.service' when: "'container' in ansible_env" +- name: Use nss-mdns + lineinfile: + path: /etc/nsswitch.conf + regexp: '^hosts:' + line: 'hosts: files mdns_minimal [NOTFOUND=return] dns myhostname' + # vim: set ts=2 sw=2 et: -- cgit v1.2.1