From 4213b600528663a8ed9260052dd5c94e124b9d4a Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Fri, 13 Nov 2020 16:28:43 +0100 Subject: [PATCH] bundles/lldp: introduce, add to all nodes at home --- bundles/lldp/files/bundlewrap.conf | 10 +++++++++ bundles/lldp/items.py | 36 ++++++++++++++++++++++++++++++ groups/locations.py | 3 +++ 3 files changed, 49 insertions(+) create mode 100644 bundles/lldp/files/bundlewrap.conf create mode 100644 bundles/lldp/items.py diff --git a/bundles/lldp/files/bundlewrap.conf b/bundles/lldp/files/bundlewrap.conf new file mode 100644 index 0000000..d0d7a9e --- /dev/null +++ b/bundles/lldp/files/bundlewrap.conf @@ -0,0 +1,10 @@ +# _ ____ _ _ _____ _ _ _ _ ____ +# / \ / ___| | | |_ _| | | | \ | |/ ___| +# / _ \| | | |_| | | | | | | | \| | | _ +# / ___ \ |___| _ | | | | |_| | |\ | |_| | +# /_/ \_\____|_| |_| |_| \___/|_| \_|\____| +# +# --> Diese Datei wird von BundleWrap verwaltet! <-- + +configure system hostname "${node.name}" +configure system platform "${node.os}" diff --git a/bundles/lldp/items.py b/bundles/lldp/items.py new file mode 100644 index 0000000..81b0de1 --- /dev/null +++ b/bundles/lldp/items.py @@ -0,0 +1,36 @@ +pkg_apt = { + 'lldpd': {}, +} + +directories = { + '/etc/lldpd.d': { + 'purge': True, + 'needs': { + 'pkg_apt:lldpd', + }, + 'triggers': { + 'svc_systemd:lldpd:restart', + }, + }, +} + +files = { + '/etc/lldpd.d/bundlewrap.conf': { + 'content_type': 'mako', + 'needs': { + 'pkg_apt:lldpd', + }, + 'triggers': { + 'svc_systemd:lldpd:restart', + }, + }, +} + +svc_systemd = { + 'lldpd': { + 'needs': { + 'pkg_apt:lldpd', + 'file:/etc/lldpd.d/bundlewrap.conf', + }, + }, +} diff --git a/groups/locations.py b/groups/locations.py index 0a64000..c52b766 100644 --- a/groups/locations.py +++ b/groups/locations.py @@ -45,6 +45,9 @@ groups['home'] = { 'member_patterns': { r"home\..*", }, + 'bundles': { + 'lldp', + }, 'metadata': { 'nameservers': { '172.19.138.1',