2020-11-09 19:39:35 +00:00
|
|
|
% for user, config in sorted(node.metadata['users'].items()):
|
2020-11-10 12:12:36 +00:00
|
|
|
% if config.get('is_admin', False):
|
|
|
|
${user} ALL=(ALL) NOPASSWD:ALL
|
|
|
|
% else:
|
2020-11-09 19:39:35 +00:00
|
|
|
% for p in sorted(config.get('sudo_commands', [])):
|
|
|
|
${user} ALL=(ALL) NOPASSWD:${p}
|
|
|
|
% endfor
|
2020-11-10 12:12:36 +00:00
|
|
|
% endif
|
2020-11-09 19:39:35 +00:00
|
|
|
% endfor
|