Merge "Stop Jenkin master restarts"

This commit is contained in:
Jenkins 2016-07-18 22:54:42 +00:00 committed by Gerrit Code Review
commit cd4ca26b45
2 changed files with 6 additions and 6 deletions

View File

@ -180,8 +180,6 @@ node 'puppetmaster.openstack.org' {
}
class { 'openstack_project::puppetmaster':
root_rsa_key => hiera('puppetmaster_root_rsa_key'),
jenkins_api_user => hiera('jenkins_api_user', 'username'),
jenkins_api_key => hiera('jenkins_api_key'),
puppetmaster_clouds => hiera('puppetmaster_clouds'),
}
}

View File

@ -1,9 +1,7 @@
# == Class: openstack_project::puppetmaster
#
class openstack_project::puppetmaster (
$jenkins_api_key,
$puppetmaster_clouds,
$jenkins_api_user = 'hudson-openstack',
$root_rsa_key = 'xxx',
$puppetdb = true,
$puppetdb_server = 'puppetdb.openstack.org',
@ -219,7 +217,7 @@ class openstack_project::puppetmaster (
# Jenkins master management
cron { 'restartjenkinsmasters':
user => 'root',
ensure => absent,
# Run through all masters onces a week.
weekday => '6',
hour => '0',
@ -228,8 +226,12 @@ class openstack_project::puppetmaster (
command => "flock -n /var/run/puppet/restart_jenkins_masters.lock ansible-playbook -f 1 /opt/system-config/production/playbooks/restart_jenkins_masters.yaml --extra-vars 'user=${jenkins_api_user} password=${jenkins_api_key}' >> /var/log/restart_jenkins_masters.log 2>&1",
}
file { '/var/log/restart_jenkins_masters.log':
ensure => absent,
}
logrotate::file { 'restartjenkinsmasters':
ensure => present,
ensure => absent,
log => '/var/log/restart_jenkins_masters.log',
options => ['compress',
'copytruncate',