From 037d4395cac158b5753b51c1511a57a084d14e4b Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Sat, 12 Dec 2015 21:15:52 -0500 Subject: [PATCH] Enable SSH access for ansible-role-jobs Here we are generating SSH keys for the jenkins user. This give the ability for Ansible to SSH to localhost to provision functional tests. We do not want to use root hence the reason for not using the existing macro. Change-Id: I2c0283c7547cfd1c98b8cc6bbafbe4a75f2b98bb Signed-off-by: Paul Belanger --- jenkins/jobs/ansible-role-jobs.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jenkins/jobs/ansible-role-jobs.yaml b/jenkins/jobs/ansible-role-jobs.yaml index a1b033f4df..45726b3d2a 100644 --- a/jenkins/jobs/ansible-role-jobs.yaml +++ b/jenkins/jobs/ansible-role-jobs.yaml @@ -19,6 +19,12 @@ builders: - zuul-git-prep + - shell: | + # Allow Jenkins user to ssh into localhost + ssh-keygen -f ~/.ssh/id_rsa -N "" + cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys + ssh-keyscan localhost >> ~/.ssh/known_hosts + ssh-keyscan 127.0.0.1 >> ~/.ssh/known_hosts - tox: envlist: ansible-functional