diff --git a/bundles/lldp/items.py b/bundles/lldp/items.py index db57423..ac02aa1 100644 --- a/bundles/lldp/items.py +++ b/bundles/lldp/items.py @@ -1,14 +1,6 @@ -if node.has_bundle('pacman'): - package = 'pkg_pacman:lldpd' -else: - package = 'pkg_apt:lldpd' - directories = { '/etc/lldpd.d': { 'purge': True, - 'needs': { - package, - }, 'triggers': { 'svc_systemd:lldpd:restart', }, @@ -18,9 +10,6 @@ directories = { files = { '/etc/lldpd.conf': { 'delete': True, - 'needs': { - package, - }, }, '/etc/lldpd.d/bundlewrap.conf': { 'content_type': 'mako', @@ -34,7 +23,6 @@ svc_systemd = { 'lldpd': { 'needs': { 'file:/etc/lldpd.d/bundlewrap.conf', - package, }, }, } diff --git a/bundles/lldp/metadata.py b/bundles/lldp/metadata.py index 4a4f010..4f230ee 100644 --- a/bundles/lldp/metadata.py +++ b/bundles/lldp/metadata.py @@ -1,12 +1,24 @@ defaults = { 'apt': { 'packages': { - 'lldpd': {}, + 'lldpd': { + 'needed_by': [ + 'directory:/etc/lldpd.d', + 'file:/etc/lldp.conf', + 'svc_systemd:lldpd', + ], + }, }, }, 'pacman': { 'packages': { - 'lldpd': {}, + 'lldpd': { + 'needed_by': [ + 'directory:/etc/lldpd.d', + 'file:/etc/lldp.conf', + 'svc_systemd:lldpd', + ], + }, }, }, } diff --git a/bundles/nfs-server/items.py b/bundles/nfs-server/items.py index b002837..8920e96 100644 --- a/bundles/nfs-server/items.py +++ b/bundles/nfs-server/items.py @@ -16,8 +16,5 @@ actions = { svc_systemd = { 'nfs-server': { - 'needs': { - 'pkg_apt:nfs-kernel-server', - }, }, } diff --git a/bundles/nfs-server/metadata.py b/bundles/nfs-server/metadata.py index d203560..c3e3ab7 100644 --- a/bundles/nfs-server/metadata.py +++ b/bundles/nfs-server/metadata.py @@ -3,7 +3,12 @@ from bundlewrap.metadata import atomic defaults = { 'apt': { 'packages': { - 'nfs-kernel-server': {} + 'nfs-server': { + 'needed_by': [ + 'svc_systemd:nfs-kernel-server', + 'action:nfs_reload_shares', + ], + }, }, }, }