bundles/telegraf: add sudoers file
This commit is contained in:
parent
2432075f9a
commit
76f46ca7d5
2 changed files with 7 additions and 0 deletions
3
bundles/telegraf/files/sudoers
Normal file
3
bundles/telegraf/files/sudoers
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
% for command in sorted(node.metadata.get('telegraf/sudo_commands', set())):
|
||||||
|
telegraf ALL=(ALL) NOPASSWD:${command}
|
||||||
|
% endfor
|
|
@ -73,6 +73,10 @@ files = {
|
||||||
'svc_systemd:telegraf:restart',
|
'svc_systemd:telegraf:restart',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'/etc/sudoers.d/telegraf': {
|
||||||
|
'source': 'sudoers',
|
||||||
|
'content_type': 'mako',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
svc_systemd = {
|
svc_systemd = {
|
||||||
|
|
Loading…
Reference in a new issue