diff --git a/bundles/lldp/items.py b/bundles/lldp/items.py index 81b0de1..db57423 100644 --- a/bundles/lldp/items.py +++ b/bundles/lldp/items.py @@ -1,12 +1,13 @@ -pkg_apt = { - 'lldpd': {}, -} +if node.has_bundle('pacman'): + package = 'pkg_pacman:lldpd' +else: + package = 'pkg_apt:lldpd' directories = { '/etc/lldpd.d': { 'purge': True, 'needs': { - 'pkg_apt:lldpd', + package, }, 'triggers': { 'svc_systemd:lldpd:restart', @@ -15,11 +16,14 @@ directories = { } files = { + '/etc/lldpd.conf': { + 'delete': True, + 'needs': { + package, + }, + }, '/etc/lldpd.d/bundlewrap.conf': { 'content_type': 'mako', - 'needs': { - 'pkg_apt:lldpd', - }, 'triggers': { 'svc_systemd:lldpd:restart', }, @@ -29,8 +33,8 @@ files = { svc_systemd = { 'lldpd': { 'needs': { - 'pkg_apt:lldpd', 'file:/etc/lldpd.d/bundlewrap.conf', + package, }, }, } diff --git a/bundles/lldp/metadata.py b/bundles/lldp/metadata.py new file mode 100644 index 0000000..4a4f010 --- /dev/null +++ b/bundles/lldp/metadata.py @@ -0,0 +1,12 @@ +defaults = { + 'apt': { + 'packages': { + 'lldpd': {}, + }, + }, + 'pacman': { + 'packages': { + 'lldpd': {}, + }, + }, +}