diff --git a/modules/openstack_project/manifests/single_use_slave.pp b/modules/openstack_project/manifests/single_use_slave.pp index 9c48e25829..10bf482684 100644 --- a/modules/openstack_project/manifests/single_use_slave.pp +++ b/modules/openstack_project/manifests/single_use_slave.pp @@ -13,7 +13,6 @@ class openstack_project::single_use_slave ( $ssh_key = $openstack_project::jenkins_ssh_key, $jenkins_gitfullname = 'OpenStack Jenkins', $jenkins_gitemail = 'jenkins@openstack.org', - $project_config_repo = 'https://git.openstack.org/openstack-infra/project-config', ) inherits openstack_project { class { 'openstack_project::template': certname => $certname, @@ -45,15 +44,6 @@ class openstack_project::single_use_slave ( gitemail => $jenkins_gitemail, } - # NOTE(pabelanger): We need to create this directory here, since slave.pp also - # creates it. Moving forward, this will be moved into DIB. - file { '/usr/local/jenkins': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - } - package { 'tox': ensure => 'latest', provider => openstack_pip, @@ -67,10 +57,8 @@ class openstack_project::single_use_slave ( require => Class[pip], } - class { 'openstack_project::slave_common': sudo => $sudo, - project_config_repo => $project_config_repo, } if (! $thin) { diff --git a/modules/openstack_project/manifests/slave.pp b/modules/openstack_project/manifests/slave.pp index a6d7034e86..db34d85aad 100644 --- a/modules/openstack_project/manifests/slave.pp +++ b/modules/openstack_project/manifests/slave.pp @@ -43,10 +43,38 @@ class openstack_project::slave ( limit_value => '256' } - class { 'openstack_project::slave_common': - project_config_repo => $project_config_repo, + class { 'project_config': + url => $project_config_repo, } + file { '/usr/local/jenkins/common_data': + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + recurse => true, + purge => true, + force => true, + require => [File['/usr/local/jenkins'], + $::project_config::config_dir], + source => $::project_config::jenkins_data_dir, + } + + file { '/usr/local/jenkins/slave_scripts': + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + recurse => true, + purge => true, + force => true, + require => [File['/usr/local/jenkins'], + $::project_config::config_dir], + source => $::project_config::jenkins_scripts_dir, + } + + class { 'openstack_project::slave_common': } + if (! $thin) { include openstack_project::thick_slave } diff --git a/modules/openstack_project/manifests/slave_common.pp b/modules/openstack_project/manifests/slave_common.pp index b08369ef9f..60c50aed94 100644 --- a/modules/openstack_project/manifests/slave_common.pp +++ b/modules/openstack_project/manifests/slave_common.pp @@ -4,7 +4,6 @@ # openstack_project::single_use_slave class openstack_project::slave_common( $sudo = false, - $project_config_repo = '', ){ vcsrepo { '/opt/requirements': ensure => latest, @@ -13,36 +12,6 @@ class openstack_project::slave_common( source => 'https://git.openstack.org/openstack/requirements', } - class { 'project_config': - url => $project_config_repo, - } - - file { '/usr/local/jenkins/common_data': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - recurse => true, - purge => true, - force => true, - require => [File['/usr/local/jenkins'], - $::project_config::config_dir], - source => $::project_config::jenkins_data_dir, - } - - file { '/usr/local/jenkins/slave_scripts': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - recurse => true, - purge => true, - force => true, - require => [File['/usr/local/jenkins'], - $::project_config::config_dir], - source => $::project_config::jenkins_scripts_dir, - } - file { '/home/jenkins/.pydistutils.cfg': ensure => present, owner => 'jenkins',