bundlewrap/bundles/sudo/items.py
mwiegand ca52fc7b64 wip
2021-07-09 00:43:29 +02:00

11 lines
274 B
Python

directories = {
'/etc/sudoers.d': {
'purge': True,
},
}
for user, commands in node.metadata.get('sudoers').items():
files[f'/etc/sudoers.d/{user}'] = {
'content': f"{user} ALL=(ALL) NOPASSWD: {', '.join(commands)}",
'mode': '500',
}