bundles/sudo: add bundle
This commit is contained in:
parent
9a956e832a
commit
067b498bf2
4 changed files with 33 additions and 3 deletions
11
bundles/sudo/metadata.py
Normal file
11
bundles/sudo/metadata.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
@metadata_processor
|
||||
def sudo_users(metadata):
|
||||
sudoers = []
|
||||
|
||||
for username, config in metadata.get('users', {}).items():
|
||||
if 'sudo' in config and config['sudo']:
|
||||
sudoers.append(username)
|
||||
|
||||
metadata['sudo'] = sudoers
|
||||
|
||||
return metadata, RUN_ME_AGAIN
|
Loading…
Add table
Add a link
Reference in a new issue