bundlewrap/bundles/lldp/items.py

41 lines
707 B
Python
Raw Normal View History

2021-02-18 14:10:50 +00:00
if node.has_bundle('pacman'):
package = 'pkg_pacman:lldpd'
else:
package = 'pkg_apt:lldpd'
directories = {
'/etc/lldpd.d': {
'purge': True,
'needs': {
2021-02-18 14:10:50 +00:00
package,
},
'triggers': {
'svc_systemd:lldpd:restart',
},
},
}
files = {
2021-02-18 14:10:50 +00:00
'/etc/lldpd.conf': {
'delete': True,
'needs': {
2021-02-18 14:10:50 +00:00
package,
},
2021-02-18 14:10:50 +00:00
},
'/etc/lldpd.d/bundlewrap.conf': {
'content_type': 'mako',
'triggers': {
'svc_systemd:lldpd:restart',
},
},
}
svc_systemd = {
'lldpd': {
'needs': {
'file:/etc/lldpd.d/bundlewrap.conf',
2021-02-18 14:10:50 +00:00
package,
},
},
}