diff --git a/manifests/site.pp b/manifests/site.pp index 9b8b5c1012..926fac8cca 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -234,8 +234,9 @@ node /^ci-backup-.*\.openstack\.org$/ { node 'devstack-launch.slave.openstack.org' { class { 'openstack_project::devstack_launch_slave': - jenkins_api_user => hiera('jenkins_api_user'), - jenkins_api_key => hiera('jenkins_api_key') + jenkins_api_user => hiera('jenkins_api_user'), + jenkins_api_key => hiera('jenkins_api_key'), + jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents') } } diff --git a/modules/openstack_project/manifests/devstack_launch_slave.pp b/modules/openstack_project/manifests/devstack_launch_slave.pp index 2b1e8b55fa..d082096b2a 100644 --- a/modules/openstack_project/manifests/devstack_launch_slave.pp +++ b/modules/openstack_project/manifests/devstack_launch_slave.pp @@ -16,7 +16,8 @@ class openstack_project::devstack_launch_slave ( $jenkins_api_user, - $jenkins_api_key + $jenkins_api_key, + $jenkins_ssh_private_key, ) { class { 'openstack_project::slave': @@ -46,4 +47,12 @@ class openstack_project::devstack_launch_slave ( content => template('openstack_project/devstack-gate-secure.conf.erb'), require => File['/home/jenkins'], } + + file { '/home/jenkins/.ssh/id_rsa': + owner => 'jenkins', + group => 'jenkins', + mode => '0400', + require => File['/home/jenkins/.ssh'], + content => $jenkins_ssh_private_key, + } }