From 91432197e8fae83fbc133d1c113ae111dc88bd5d Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 22 Dec 2024 20:19:59 +0100 Subject: [PATCH] add bundle:avahi-daemon --- bundles/avahi-daemon/files/avahi-daemon.conf | 21 ++++++++++++++++++++ bundles/avahi-daemon/items.py | 17 ++++++++++++++++ bundles/avahi-daemon/metadata.py | 7 +++++++ 3 files changed, 45 insertions(+) create mode 100644 bundles/avahi-daemon/files/avahi-daemon.conf create mode 100644 bundles/avahi-daemon/items.py create mode 100644 bundles/avahi-daemon/metadata.py diff --git a/bundles/avahi-daemon/files/avahi-daemon.conf b/bundles/avahi-daemon/files/avahi-daemon.conf new file mode 100644 index 0000000..7a639fd --- /dev/null +++ b/bundles/avahi-daemon/files/avahi-daemon.conf @@ -0,0 +1,21 @@ +[server] +host-name=${node.name.split('.')[-1]} +use-ipv4=yes +use-ipv6=yes +ratelimit-interval-usec=1000000 +ratelimit-burst=1000 + +[wide-area] +enable-wide-area=yes + +[publish] +disable-publishing=no +disable-user-service-publishing=no +publish-hinfo=yes +publish-workstation=no +publish-aaaa-on-ipv4=yes +publish-a-on-ipv6=no + +[reflector] + +[rlimits] diff --git a/bundles/avahi-daemon/items.py b/bundles/avahi-daemon/items.py new file mode 100644 index 0000000..74bcdd3 --- /dev/null +++ b/bundles/avahi-daemon/items.py @@ -0,0 +1,17 @@ +directories['/etc/avahi/services'] = { + 'purge': True, +} + +files['/etc/avahi/avahi-daemon.conf'] = { + 'content_type': 'mako', + 'triggers': { + 'svc_systemd:avahi-daemon:restart', + }, +} + +svc_systemd['avahi-daemon'] = { + 'needs': { + 'file:/etc/avahi/avahi-daemon.conf', + 'pkg_apt:avahi-daemon', + }, +} diff --git a/bundles/avahi-daemon/metadata.py b/bundles/avahi-daemon/metadata.py new file mode 100644 index 0000000..b1400d9 --- /dev/null +++ b/bundles/avahi-daemon/metadata.py @@ -0,0 +1,7 @@ +defaults = { + 'apt': { + 'packages': { + 'avahi-daemon': {}, + }, + }, +}