bundles/telegraf: add sudoers file

This commit is contained in:
Franzi 2021-04-24 10:08:55 +02:00
parent 2432075f9a
commit 76f46ca7d5
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,3 @@
% for command in sorted(node.metadata.get('telegraf/sudo_commands', set())):
telegraf ALL=(ALL) NOPASSWD:${command}
% endfor

View file

@ -73,6 +73,10 @@ files = {
'svc_systemd:telegraf:restart',
},
},
'/etc/sudoers.d/telegraf': {
'source': 'sudoers',
'content_type': 'mako',
},
}
svc_systemd = {