bundlewrap/bundles/telegraf/items.py
mwiegand 02ca519489 wip
2021-07-04 23:17:57 +02:00

15 lines
336 B
Python

from tomlkit import dumps
files['/etc/telegraf/telegraf.conf'] = {
'content': dumps(node.metadata.get('telegraf/config'), sort_keys=True),
'triggers': [
'svc_systemd:telegraf:restart',
],
}
svc_systemd['telegraf'] = {
'needs': [
'file:/etc/telegraf/telegraf.conf',
'pkg_apt:telegraf',
],
}