ansible/roles/avahi/tasks/main.yaml

31 lines
700 B
YAML
Raw Permalink Normal View History

2024-09-15 14:12:48 +03:00
- name: Populate service facts
ansible.builtin.service_facts:
- name: Stop and disable systemd-resolved
ansible.builtin.systemd:
name: systemd-resolved
state: stopped
enabled: false
when: "'systemd-resolved' in services"
- name: Install Avahi Daemon and helpers
ansible.builtin.apt:
name: "{{ item }}"
state: latest
update_cache: yes
install_recommends: no
with_items:
- avahi-daemon
- avahi-utils
- libnss-mdns
notify: Autoremove and autoclean packages
- name: Configure /etc/nsswitch.conf
ansible.builtin.copy:
src: nsswitch.conf
dest: /etc/nsswitch.conf
owner: root
group: root
mode: 0644
notify: Restart Avahi Daemon