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:
parent
cee41ed29d
commit
c699212b6d
6 changed files with 26 additions and 5 deletions
|
@ -1,2 +1,4 @@
|
|||
# ansible_role_template
|
||||
Template for Ansible roles
|
||||
ansible role avahi_client
|
||||
===========================
|
||||
|
||||
Ansible role to resolve the .local domain via mdns and discover avahi services.
|
||||
|
|
14
tasks/install.yml
Normal file
14
tasks/install.yml
Normal 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
|
|
@ -8,3 +8,6 @@
|
|||
with_first_found:
|
||||
- "vars/{{ ansible_os_family }}.yml"
|
||||
- "vars/os_fallback.yml"
|
||||
|
||||
- name: install mdns requirements
|
||||
ansible.builtin.include_tasks: install.yml
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
avahi_packages:
|
||||
- avahi
|
||||
- mdns-scan
|
||||
- nss-mdns
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
avahi_packages:
|
||||
- 'avahi-daemon'
|
||||
- 'avahi-utils'
|
||||
- 'avahi-discover'
|
||||
- 'avahi-utils'
|
||||
- 'mdns-scan'
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
avahi_packages:
|
||||
- avahi
|
||||
- mdns-scan
|
||||
|
|
Loading…
Reference in a new issue