Merge "Move jenkins-sudo bits to openstack_project"

This commit is contained in:
Jenkins 2014-05-23 20:11:18 +00:00 committed by Gerrit Code Review
commit 5f1f5b2167
3 changed files with 20 additions and 20 deletions

View File

@ -2,7 +2,6 @@
#
class jenkins::slave(
$ssh_key = '',
$sudo = false,
$user = true,
$python3 = false,
) {
@ -179,22 +178,4 @@ class jenkins::slave(
group => 'root',
mode => '0755',
}
if ($sudo == true) {
file { '/etc/sudoers.d/jenkins-sudo':
ensure => present,
source => 'puppet:///modules/jenkins/jenkins-sudo.sudo',
owner => 'root',
group => 'root',
mode => '0440',
}
}
file { '/etc/sudoers.d/jenkins-sudo-grep':
ensure => present,
source => 'puppet:///modules/jenkins/jenkins-sudo-grep.sudo',
owner => 'root',
group => 'root',
mode => '0440',
}
}

View File

@ -36,12 +36,12 @@ class openstack_project::single_use_slave (
}
class { 'jenkins::slave':
ssh_key => $ssh_key,
sudo => $sudo,
python3 => $python3,
}
class { 'openstack_project::slave_common':
include_pypy => $include_pypy,
sudo => $sudo,
}
if (! $thin) {

View File

@ -4,6 +4,7 @@
# openstack_project::single_use_slave
class openstack_project::slave_common(
$include_pypy = false,
$sudo = false,
){
vcsrepo { '/opt/requirements':
ensure => latest,
@ -24,6 +25,24 @@ class openstack_project::slave_common(
source => 'puppet:///modules/openstack_project/slave_scripts',
}
if ($sudo == true) {
file { '/etc/sudoers.d/jenkins-sudo':
ensure => present,
source => 'puppet:///modules/openstack_project/jenkins-sudo.sudo',
owner => 'root',
group => 'root',
mode => '0440',
}
}
file { '/etc/sudoers.d/jenkins-sudo-grep':
ensure => present,
source => 'puppet:///modules/openstack_project/jenkins-sudo-grep.sudo',
owner => 'root',
group => 'root',
mode => '0440',
}
# Temporary for debugging glance launch problem
# https://lists.launchpad.net/openstack/msg13381.html
# NOTE(dprince): ubuntu only as RHEL6 doesn't have sysctl.d yet