bundles/telegraf: also work for arch linux systems

This commit is contained in:
Franzi 2021-05-02 07:32:54 +02:00
parent 8c276b53a6
commit 1a1ea721d9
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 16 additions and 4 deletions

View file

@ -105,9 +105,6 @@ else:
users = {
'telegraf': {
'groups': node.metadata.get('telegraf/additional_groups', set()),
'needs': {
'pkg_apt:telegraf',
},
'triggers': {
'svc_systemd:telegraf:restart',
},
@ -119,8 +116,16 @@ svc_systemd = {
'needs': {
'file:/etc/telegraf/telegraf.conf',
'file:/etc/systemd/system/telegraf.service.d/bundlewrap.conf',
'pkg_apt:telegraf',
'user:telegraf',
},
},
}
if node.has_bundle('apt'):
svc_systemd['telegraf']['needs'].add('pkg_apt:telegraf')
users['telegraf']['needs'] = {
'pkg_apt:telegraf',
}
# Arch users: install telegraf or telegraf-bin from AUR