1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_avahi_client.git synced 2024-08-16 16:09:49 +02:00

install mdns and avahi-discover

This commit is contained in:
L3D 2021-09-02 02:02:53 +02:00
parent cee41ed29d
commit c699212b6d
Signed by: l3d
GPG key ID: CD08445BFF4313D1
6 changed files with 26 additions and 5 deletions

View file

@ -1,2 +1,4 @@
# ansible_role_template ansible role avahi_client
Template for Ansible roles ===========================
Ansible role to resolve the .local domain via mdns and discover avahi services.

14
tasks/install.yml Normal file
View file

@ -0,0 +1,14 @@
---
- name: Update apt cache
become: true
ansible.builtin.apt:
cache_valid_time: 3600
update_cache: true
when:
- ansible_pkg_mgr == "apt"
- name: install avahi packages
become: true
ansible.builtin.package:
name: "{{ avahi_packages }}"
state: present

View file

@ -8,3 +8,6 @@
with_first_found: with_first_found:
- "vars/{{ ansible_os_family }}.yml" - "vars/{{ ansible_os_family }}.yml"
- "vars/os_fallback.yml" - "vars/os_fallback.yml"
- name: install mdns requirements
ansible.builtin.include_tasks: install.yml

View file

@ -1,3 +1,5 @@
--- ---
avahi_packages: avahi_packages:
- avahi - avahi
- mdns-scan
- nss-mdns

View file

@ -1,5 +1,5 @@
--- ---
avahi_packages: avahi_packages:
- 'avahi-daemon'
- 'avahi-utils'
- 'avahi-discover' - 'avahi-discover'
- 'avahi-utils'
- 'mdns-scan'

View file

@ -1,3 +1,3 @@
--- ---
avahi_packages: avahi_packages:
- avahi - mdns-scan