bundlewrap/bundles/mosquitto/items.py
Franzi 94dba9139b
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/mosquitto: rewrite tasmota-telegraf-plugin using paho-mqtt library
2021-06-06 15:17:34 +02:00

29 lines
623 B
Python

files = {
'/etc/mosquitto/mosquitto.conf': {
'content_type': 'mako',
'triggers': {
'svc_systemd:mosquitto:restart',
},
},
'/usr/local/bin/tasmota-telegraf-plugin': {
'mode': '0755',
'needs': {
'pkg_apt:python3-paho-mqtt',
},
},
}
svc_systemd = {
'mosquitto': {
'needs': {
'file:/etc/mosquitto/mosquitto.conf',
'pkg_apt:mosquitto',
},
},
}
if node.has_bundle('telegraf'):
files['/usr/local/bin/tasmota-telegraf-plugin']['triggers'] = {
'svc_systemd:telegraf:restart',
}