system-config/modules/openstack_project/manifests/proposal_slave.pp
Monty Taylor ba2b36bad4 Add slave-common to long lived slaves
We need the jenkins slave scripts on these too.

Change-Id: I25ef6bf730cba1e0aee0b027d1517dd4636c8b47
2015-06-29 17:21:53 +00:00

56 lines
1.5 KiB
Puppet

# Slave used for automatically proposing changes to Gerrit,
# Transifex and other tools.
#
# == Class: openstack_project::translation_slave
#
class openstack_project::proposal_slave (
$jenkins_ssh_public_key,
$proposal_ssh_public_key,
$proposal_ssh_private_key,
$transifex_password = '',
$transifex_username = 'openstackci',
$jenkins_gitfullname = 'OpenStack Jenkins',
$jenkins_gitemail = 'jenkins@openstack.org',
$project_config_repo = 'https://git.openstack.org/openstack-infra/project-config',
) {
include zanata::client
class { 'openstack_project::slave':
ssh_key => $jenkins_ssh_public_key,
jenkins_gitfullname => $jenkins_gitfullname,
jenkins_gitemail => $jenkins_gitemail,
project_config_repo => $project_config_repo,
}
package { ['transifex-client', 'Babel']:
ensure => latest,
provider => pip,
require => Class['pip'],
}
file { '/home/jenkins/.transifexrc':
ensure => present,
owner => 'jenkins',
group => 'jenkins',
mode => '0600',
content => template('openstack_project/transifexrc.erb'),
require => User['jenkins'],
}
file { '/home/jenkins/.ssh/id_rsa':
owner => 'jenkins',
group => 'jenkins',
mode => '0400',
require => File['/home/jenkins/.ssh'],
content => $proposal_ssh_private_key,
}
file { '/home/jenkins/.ssh/id_rsa.pub':
owner => 'jenkins',
group => 'jenkins',
mode => '0400',
require => File['/home/jenkins/.ssh'],
content => $proposal_ssh_public_key,
}
}