remove users/$user/is_admin metadata, directly write sudo_commands instead

This commit is contained in:
Franzi 2024-02-25 15:29:10 +01:00
parent 02e25f89ff
commit 7d4624ce62
Signed by: kunsi
GPG key ID: 12E3D2136B818350
7 changed files with 8 additions and 26 deletions

View file

@ -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