bundles/lldp: support arch linux

This commit is contained in:
Franzi 2021-02-18 15:10:50 +01:00
parent e54fd79bcd
commit 75224f0d5c
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 24 additions and 8 deletions

View file

@ -1,12 +1,13 @@
pkg_apt = { if node.has_bundle('pacman'):
'lldpd': {}, package = 'pkg_pacman:lldpd'
} else:
package = 'pkg_apt:lldpd'
directories = { directories = {
'/etc/lldpd.d': { '/etc/lldpd.d': {
'purge': True, 'purge': True,
'needs': { 'needs': {
'pkg_apt:lldpd', package,
}, },
'triggers': { 'triggers': {
'svc_systemd:lldpd:restart', 'svc_systemd:lldpd:restart',
@ -15,11 +16,14 @@ directories = {
} }
files = { files = {
'/etc/lldpd.conf': {
'delete': True,
'needs': {
package,
},
},
'/etc/lldpd.d/bundlewrap.conf': { '/etc/lldpd.d/bundlewrap.conf': {
'content_type': 'mako', 'content_type': 'mako',
'needs': {
'pkg_apt:lldpd',
},
'triggers': { 'triggers': {
'svc_systemd:lldpd:restart', 'svc_systemd:lldpd:restart',
}, },
@ -29,8 +33,8 @@ files = {
svc_systemd = { svc_systemd = {
'lldpd': { 'lldpd': {
'needs': { 'needs': {
'pkg_apt:lldpd',
'file:/etc/lldpd.d/bundlewrap.conf', 'file:/etc/lldpd.d/bundlewrap.conf',
package,
}, },
}, },
} }

12
bundles/lldp/metadata.py Normal file
View file

@ -0,0 +1,12 @@
defaults = {
'apt': {
'packages': {
'lldpd': {},
},
},
'pacman': {
'packages': {
'lldpd': {},
},
},
}