user-mgmnt/templates/sudoers.j2

12 lines
194 B
Django/Jinja

# {{ ansible_managed }}
root ALL=(ALL) ALL
%sudo ALL=(ALL) NOPASSWD: ALL
{% for user in managed_users %}
{% if user.sudoer %}
{{ user.name }} ALL=(ALL) NOPASSWD: ALL
{% endif %}
{% endfor %}