Fix the SSH configuration path

The ssh client configuration needs to be dropped in /root/.ssh/config
since the deployment script runs in sudo.

Change-Id: I598ff085c45b1e27a57d2183ef00c65c3792b9fe
This commit is contained in:
Logan V 2018-09-13 11:43:38 -06:00
parent 0f093b78cd
commit 27152d9739
2 changed files with 14 additions and 3 deletions

View File

@ -1,5 +1,6 @@
---
# Drop the vault key
- hosts: all
pre_tasks:
- name: Create the vault key path
@ -13,15 +14,25 @@
content: "{{ vault_secret.key }}"
dest: "{{ vault_key_path }}"
mode: '0600'
# Drop the SSH proxyjump configuration
- hosts: all
become: yes
become_user: root
tasks:
- name: Ensure the SSH configuration directory exists
file:
path: "{{ ansible_user_dir }}/.ssh"
path: /root/.ssh
state: directory
- name: Copy the SSH proxy configuration
copy:
src: "{{ lsn_ci_src_path }}/ssh/ssh_config"
dest: "{{ ansible_user_dir }}/.ssh/config"
dest: /root/.ssh/config
remote_src: yes
# Start SSH agent and load the deployment key
- hosts: all
tasks:
# Load the deployment SSH key
- name: Create the SSH private key tempfile
tempfile:

View File

@ -2,5 +2,5 @@
# is used from the nodepool deployment host through the first infrastructure
# host, lsn-mc1016.
Host *
Host 10.*
ProxyJump root@192.169.91.98