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

initial commit avahi packages

This commit is contained in:
L3D 2021-09-01 23:36:05 +02:00
parent 84088be05a
commit 53e9407c56
Signed by: l3d
GPG key ID: CD08445BFF4313D1
7 changed files with 43 additions and 2 deletions

View file

@ -1,3 +1,10 @@
---
avahi_packages:
- 'avahi-daemon'
- 'avahi-utils'
#- 'avahi-discover'
#- 'mdns-scan'
# should we do a version check? (recomended)
submodules_versioncheck: false

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

@ -2,3 +2,12 @@
- name: run optional versionscheck
ansible.builtin.include_tasks: versioncheck.yml
when: submodules_versioncheck|bool
- name: gather os specific variables
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
- "vars/{{ ansible_os_family }}.yml"
- "vars/os_fallback.yml"
- name: install avahi requirements
ansible.builtin.include_tasks: install.yml

3
vars/Archlinux.yml Normal file
View file

@ -0,0 +1,3 @@
---
avahi_packages:
- avahi

5
vars/Debian.yml Normal file
View file

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

View file

@ -1,4 +1,4 @@
---
# versionscheck
playbook_version_number: 02 # should be a integer
playbook_version_path: 'role-<some_unique_string>.version'
playbook_version_number: 3
playbook_version_path: 'do1jlr.avahi_daemon.version'

3
vars/os_fallback.yml Normal file
View file

@ -0,0 +1,3 @@
---
avahi_packages:
- avahi