Move jenkins-sudo bits to openstack_project
The jenkins-sudo privileges are specific to the slave_scripts directory, which has already been moved to the openstack_project. Let's keep these two things together. Change-Id: I0ef16850bf97d54f1ac92e41e5bd31e7f6f40ea9
This commit is contained in:
parent
ab333555eb
commit
541fac117b
@ -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',
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user