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 68b02260 authored by eric pellegrini's avatar eric pellegrini

added possibility to deploy private and/or public key in cluster-users role

parent db810fed
---
- block:
- name: create the .ssh key directory
- name: create the .ssh directory
file:
path: "~/.ssh"
state: directory
......@@ -11,15 +11,15 @@
src: "{{ item.private }}"
dest: "~/.ssh/"
mode: "600"
when: item.private is defined
when: (item.identity_file is defined) and (item.add_private | default(False) == True)
loop: "{{ user.identity_files | default([])}}"
- name: install internal public key
- name: install public key
authorized_key:
user: "{{ user.name }}"
state: present
key: "{{ lookup('file', item.private) }}"
when: item.private is defined
when: (item.identity_file is defined) and (item.add_public | default(False) == True)
loop: "{{ user.identity_files | default([])}}"
- name: create the ssh_config template
......@@ -30,6 +30,7 @@
force: True
vars:
identity_files: "{{ users['identity_files'] | default([])}}"
become_user: "{{ user.name }}"
become: True
......
{% for config_host in identity_files %}
{% if config_host.private is defined %}
{% if config_host.identity_file is defined %}
{% if (config_host.host is defined) %}
{% for host in config_host.host %}
Host "{{ host}}"
StrictHostKeyChecking no
IdentityFile "{{ config_host.private }}"
IdentityFile "{{ config_host.identity_file }}"
{% endfor %}
{% endif %}
......
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