Skip to content
Snippets Groups Projects
Commit 501eeca7 authored by Zdeněk Vydra's avatar Zdeněk Vydra
Browse files

Add option to grant sudo

parent 23a10391
No related branches found
No related tags found
No related merge requests found
......@@ -6,3 +6,4 @@ kypo_user_access_ssh_public_key: '{{ kypo_global_ssh_public_user_key | default(k
kypo_user_access_ssh_public_key_options:
kypo_user_access_password:
kypo_user_access_present: True
kypo_user_access_sudo: False
......@@ -30,3 +30,11 @@
regexp: '^#?PasswordAuthentication'
when: kypo_user_access_password is defined and kypo_user_access_password
notify: Reload SSH service
- name: grant sudo if defined
lineinfile:
dest: /etc/sudoers
regexp: '^{{ kypo_user_access_username }}'
line: '{{ kypo_user_access_username }} ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s'
when: kypo_user_access_sudo
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment