Remove /etc/sudoers.d/jenkins-sudo support

We can move /etc/sudoers.d/jenkins-sudo into a DIB element, and
properly clean up slave_common.pp of our other sudoers.d settings.

Change-Id: I548b22f68b4f288fe1c4658abf9b42a47dc7fa68
Depends-On: Icaceeefbf6c3765d15d0e1488006f9f52661fba3
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-04-12 14:32:54 -04:00
parent f59649165d
commit 4d1564635a
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
4 changed files with 9 additions and 23 deletions

View File

@ -1 +0,0 @@
jenkins ALL=(ALL) NOPASSWD:ALL

View File

@ -41,8 +41,5 @@ class openstack_project::single_use_slave (
gitemail => $jenkins_gitemail,
}
class { 'openstack_project::slave_common':
sudo => $sudo,
}
class { 'openstack_project::slave_common': }
}

View File

@ -34,6 +34,14 @@ class openstack_project::slave (
gerritkey => $jenkins_gerritkey,
}
file { '/etc/sudoers.d/jenkins-sudo-grep':
ensure => present,
source => 'puppet:///modules/openstack_project/jenkins-sudo-grep.sudo',
owner => 'root',
group => 'root',
mode => '0440',
}
include jenkins::cgroups
include ulimit
ulimit::conf { 'limit_jenkins_procs':

View File

@ -3,23 +3,5 @@
# Common configuration between openstack_project::slave and
# openstack_project::single_use_slave
class openstack_project::slave_common(
$sudo = false,
){
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',
}
}