Skip to content
Snippets Groups Projects
Commit 470b8b91 authored by Karolína Dočkalová Burská's avatar Karolína Dočkalová Burská
Browse files

Merge branch '5-add-option-to-set-sudo' into 'master'

Add option to grant sudo

Closes #5

See merge request muni-kypo-crp/backend-python/ansible-networking-stage/kypo-user-access!6
parents 23a10391 501eeca7
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