If you are using GitLab outside of the ILL, then you will need to use HTTPS and not SSH for clone/push/pull operations. SSH will work normally if you are using the VPN.

Commit ca1d5aed authored by eric pellegrini's avatar eric pellegrini

bug fix adding user-specific line in sudoers

bug fix when getting public key from local file
parent 68b02260
......@@ -239,15 +239,15 @@ ansible_controller:
cluster_users_commons:
passwordless_sudo: True
identity_files:
- private: "{{ os_keypairs[0]['identity_file'] }}"
public: "{{ os_keypairs[0]['identity_file'] }}.pub"
- identity_file: "{{ os_keypairs[0]['identity_file'] }}"
add_private: True
add_public: True
host:
- 192.168.13.*
- private: "{{ os_keypairs[1]['identity_file'] }}"
public: "{{ os_keypairs[1]['identity_file'] }}.pub"
host:
- 192.168.13.*
- identity_file: "{{ os_keypairs[1]['identity_file'] }}"
add_private: False
add_public: True
cluster_users:
- name: ubuntu
......
......@@ -9,7 +9,7 @@
lineinfile:
path: /etc/sudoers
state: present
regexp: '^%sudo'
regexp: '^%sudo{{ user.name }}'
line: '{{ user.name }} ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s'
when: user.name in sudo_group
......
......@@ -18,7 +18,7 @@
authorized_key:
user: "{{ user.name }}"
state: present
key: "{{ lookup('file', item.private) }}"
key: "{{ lookup('file', item.private+'.pub') }}"
when: (item.identity_file is defined) and (item.add_public | default(False) == True)
loop: "{{ user.identity_files | default([])}}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment