Update to 2020-04-20 19:00

master
Daniel Berteaud 5 years ago
parent 4326c70979
commit f145d0f31a
  1. 3
      roles/ssh/defaults/main.yml
  2. 3
      roles/ssh/templates/sudo.j2

@ -43,6 +43,9 @@ sshd_password_auth: yes
# chroot: /var/www/html
# keys_file: %h/.ssh/authorized_keys
# allow_forwarding: False
# sudo_defaults:
# - '!env_reset'
# - '!requiretty'
# sudo:
# - cmd:
# - /usr/local/bin/

@ -1,4 +1,7 @@
{% 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(',') }}

Loading…
Cancel
Save