2020-08-18 13:27:55 +00:00
|
|
|
@metadata_reactor
|
2020-03-27 11:52:17 +00:00
|
|
|
def sudo_users(metadata):
|
2020-09-20 13:11:52 +00:00
|
|
|
sudoers = {}
|
2020-03-27 11:52:17 +00:00
|
|
|
|
|
|
|
for username, config in metadata.get('users', {}).items():
|
2020-09-20 13:11:52 +00:00
|
|
|
if 'sudo_commands' in config:
|
|
|
|
sudoers[username] = config['sudo_commands']
|
2020-03-27 11:52:17 +00:00
|
|
|
|
2020-08-18 13:27:55 +00:00
|
|
|
return {
|
|
|
|
'sudo': sudoers,
|
|
|
|
}
|