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

View file

@ -11,6 +11,7 @@ nodes['kunsi-t470'] = {
'sudo',
'systemd',
'systemd-networkd',
'telegraf',
'users',
},
'groups': set(),
@ -59,6 +60,12 @@ nodes['kunsi-t470'] = {
'systemd-networkd': {
'enable-resolved': True,
},
'telegraf': {
'influxdb_url': 'https://influxdb.kunsmann.eu/',
'influxdb_token': vault.decrypt('encrypt$gAAAAABgg9Ag632Xyuc6SWXaR1uH2tLOChmVKAoBIikhjntSSD2qJFL_eouVQGXCLH2HEuSbSdEXcTPn2qmhOiA9jmFdoDSbVbQUsp0EID1wLsWYG_Um2KOxZSF-tn9eDZlgShQYySjzO3nQRmdlJpVLUnGHsiwv_sHD2FstXGpfzTPZq5_egUqEc0K2X-aN2J6BTYc2fZAN'),
'influxdb_org': vault.decrypt('encrypt$gAAAAABgg9hyjz4XtvG8NBw9uYxiumS3v7YKIrtc9tTTABg1f9R22gzn55q8ULP9X3wlsPMUQs_DH7CgGv9neYmvVAriRoyd8g=='),
'influxdb_bucket': vault.decrypt('encrypt$gAAAAABgg9iMnq0nKpODMiMN4NtUw231iqpbyDXV-O8epOAGDSL4jcf3CaSa2bLZzH2fJFaKWjW-dpVd384x6KqSQU19XpfsWA=='),
},
'users': {
'kunsi': {
'password': vault.decrypt('encrypt$gAAAAABgLmmuQGRUStrQawoPee-758emIYn2u8-8ebrgzNAFSp7ifeFDdXXvs-zL3QogwNYlCtBHboH2xfy1rSj6OF5bbNO-tg=='),