remove users/$user/is_admin metadata, directly write sudo_commands instead
This commit is contained in:
parent
02e25f89ff
commit
7d4624ce62
7 changed files with 8 additions and 26 deletions
|
@ -1,9 +1,5 @@
|
|||
% for user, config in sorted(node.metadata['users'].items()):
|
||||
% if config.get('is_admin', False):
|
||||
${user} ALL=(ALL) NOPASSWD:ALL
|
||||
% else:
|
||||
% for p in sorted(config.get('sudo_commands', [])):
|
||||
% for p in sorted(config.get('sudo_commands', [])):
|
||||
${user} ALL=(ALL) NOPASSWD:${p}
|
||||
% endfor
|
||||
% endif
|
||||
% endfor
|
||||
% endfor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue