diff --git a/.github/galaxy.svg b/.github/galaxy.svg
deleted file mode 100644
index 16fce7b..0000000
--- a/.github/galaxy.svg
+++ /dev/null
@@ -1,95 +0,0 @@
-
diff --git a/.github/license.svg b/.github/license.svg
deleted file mode 100644
index 4ab6d9a..0000000
--- a/.github/license.svg
+++ /dev/null
@@ -1,217 +0,0 @@
-
-
diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml
index b5dc0ec..b42518a 100644
--- a/.github/workflows/galaxy.yml
+++ b/.github/workflows/galaxy.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: galaxy
uses: robertdebock/galaxy-action@1.1.0
with:
diff --git a/README.md b/README.md
index f78c6fe..d4bbb22 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
-[![Galaxy](https://github.com/roles-ansible/ansible_role_avahi_daemon/raw/main/.github/galaxy.svg)](https://galaxy.ansible.com/do1jlr/avahi_daemon)
-[![License](https://github.com/roles-ansible/ansible_role_avahi_daemon/raw/main/.github/license.svg)](https://github.com/roles-ansible/ansible_role_avahi_daemon/blob/main/LICENSE)
+[![Ansible Galaxy](https://ansible.l3d.space/svg/l3d.avahi_daemon.svg)](https://galaxy.ansible.com/ui/standalone/roles/l3d/avahi_daemon/)
+[![MIT License](https://ansible.l3d.space/svg/l3d.avahi_daemon_license.svg)](LICENSE)
+[![Maintainance](https://ansible.l3d.space/svg/l3d.avahi_daemon_maintainance.svg)](https://ansible.l3d.space/#l3d.avahi_daemon)
ansible role avahi_daemon
===========================
@@ -53,6 +54,18 @@ daddr 224.0.0.251 proto udp dport 5353 ACCEPT;
daddr ff02::fb proto udp dport 5353 ACCEPT;
```
+ Ansible Collection
+--------------------
+This role is part of the ``l3d.avahi`` Ansible Collection.
+
+[![collection l3d.avahi](https://ansible.l3d.space/svg/l3d.avahi_ansible-collection_collection.svg)](https://galaxy.ansible.com/l3d/avahi)
+[![Maintainance](https://ansible.l3d.space/svg/l3d.avahi_maintainance_collection.svg)](https://ansible.l3d.space/#l3d.avahi)
+[![License](https://ansible.l3d.space/svg/l3d.avahi_license_collection.svg)](LICENSE)
+
+Visit the [README.md](https://github.com/roles-ansible/ansible_collection_avahi#readme) of the l3d.avahi collection for information about downloading or integrating the collection to your ansible playbook.
+
+### Role Usage Example:
+```bash
Links
-----
* http://dns-sd.org/
diff --git a/handlers/main.yml b/handlers/main.yml
index 57476e8..09d4e49 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -1,5 +1,5 @@
---
-- name: systemctl restart avahi-daemon.service
+- name: Run systemctl restart avahi-daemon.service
become: true
ansible.builtin.systemd:
name: avahi-daemon.service
diff --git a/meta/main.yml b/meta/main.yml
index d91ddae..2d3fe29 100644
--- a/meta/main.yml
+++ b/meta/main.yml
@@ -1,21 +1,23 @@
---
galaxy_info:
role_name: avahi_daemon
- author: do1jlr
+ author: l3d
+ namespace: l3d
description: Install avahi and optionally announce avahi services
license: "MIT"
- min_ansible_version: 2.11
+ min_ansible_version: "2.12"
github_branch: main
platforms:
- - name: Archlinux
- versions: all
- name: Debian
- versions: all
+ versions: ['all']
+ - name: ArchLinux
+ versions: ['all']
- name: Ubuntu
- versions: all
+ versions: ['all']
galaxy_tags:
- avahi
- daemon
- mdns
- bonjour
+ - linux
dependencies: []
diff --git a/tasks/avahi_services.yml b/tasks/avahi_services.yml
index f78063f..04bea8f 100644
--- a/tasks/avahi_services.yml
+++ b/tasks/avahi_services.yml
@@ -1,5 +1,5 @@
---
-- name: mkdir /etc/avahi/services/
+- name: Create Directory /etc/avahi/services/
become: true
ansible.builtin.file:
owner: root
@@ -10,6 +10,8 @@
with_items:
- '/etc/avahi'
- '/etc/avahi/services'
+ notify:
+ - Run systemctl restart avahi-daemon.service
- name: Copy configured avahi services
become: true
@@ -20,5 +22,5 @@
group: root
mode: 'u=rw,g=r,o=r'
notify:
- - systemctl restart avahi-daemon.service
+ - Run systemctl restart avahi-daemon.service
with_items: "{{ avahi_daemon__services }}"
diff --git a/tasks/install.yml b/tasks/install.yml
index 995fabb..3318dfd 100644
--- a/tasks/install.yml
+++ b/tasks/install.yml
@@ -7,8 +7,10 @@
when:
- ansible_pkg_mgr == "apt"
-- name: install avahi packages
+- name: Install avahi packages
become: true
ansible.builtin.package:
name: "{{ avahi_daemon__packages }}"
state: present
+ notify:
+ - Run systemctl restart avahi-daemon.service
diff --git a/tasks/main.yml b/tasks/main.yml
index 79e62bc..93bffa2 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -1,16 +1,16 @@
---
-- name: run optional versionscheck
+- name: Run optional versionscheck
ansible.builtin.include_tasks: versioncheck.yml
- when: submodules_versioncheck|bool
+ when: submodules_versioncheck | bool
-- name: gather os specific variables
+- 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
+- name: Install avahi requirements
ansible.builtin.include_tasks: install.yml
-- name: optionally announce avahi services
+- name: Optionally announce avahi services
ansible.builtin.include_tasks: avahi_services.yml
diff --git a/tasks/versioncheck.yml b/tasks/versioncheck.yml
index 5128cc8..dd22a1a 100644
--- a/tasks/versioncheck.yml
+++ b/tasks/versioncheck.yml
@@ -8,37 +8,38 @@
path: '/etc/.ansible-version'
state: directory
mode: 0755
- when: submodules_versioncheck|bool
+ when: submodules_versioncheck | bool
-- name: check playbook version
+- name: Check playbook version
become: true
ansible.builtin.slurp:
src: "/etc/.ansible-version/{{ playbook_version_path }}"
register: playbook_version
- when: submodules_versioncheck|bool
+ when: submodules_versioncheck | bool
ignore_errors: true
failed_when: false
- name: Print remote role version
ansible.builtin.debug:
msg: "Remote role version: {{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}"
- when: submodules_versioncheck|bool
+ when: submodules_versioncheck | bool
- name: Print locale role version
ansible.builtin.debug:
- msg: "Local role version: '{{ playbook_version_number|string }}'."
- when: submodules_versioncheck|bool
+ msg: "Local role version: '{{ playbook_version_number | string }}'."
+ when: submodules_versioncheck | bool
- name: Check if your version is outdated
ansible.builtin.fail:
msg: "Your ansible module has the version '{{ playbook_version_number }}' and is outdated. You need to update it!"
when:
- - playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck|bool
+ - playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck | bool
-- name: write new version to remote disk
+- name: Write new version to remote disk
become: true
ansible.builtin.copy:
content: "{{ playbook_version_number }}"
dest: "/etc/.ansible-version/{{ playbook_version_path }}"
mode: '0644'
- when: submodules_versioncheck|bool
+ when: submodules_versioncheck | bool
+ tags: skip_ansible_lint_template-instead-of-copy