mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 07:37:20 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
11
roles/ssh/templates/sudo.j2
Normal file
11
roles/ssh/templates/sudo.j2
Normal file
@@ -0,0 +1,11 @@
|
||||
{% for user in ssh_users | default([]) %}
|
||||
{% if user.sudo_defaults is defined and user.sudo_defaults | length > 0 %}
|
||||
Defaults:{{ user.name }} {{ user.sudo_defaults | join(',') }}
|
||||
{% endif %}
|
||||
{% if user.sudo is defined %}
|
||||
{% for command in user.sudo %}
|
||||
{{ user.name }} ALL=({{ command.run_as | default('root') }}) {% if command.nopasswd is defined and command.nopasswd %} NOPASSWD: {% endif %} {{ command.cmd | join(',') }}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
Reference in New Issue
Block a user