Merge "Remove update_slave from puppetmaster"

This commit is contained in:
Jenkins 2014-09-11 21:44:32 +00:00 committed by Gerrit Code Review
commit 814adfc6a2
2 changed files with 15 additions and 22 deletions

View File

@ -183,7 +183,6 @@ node 'ci-puppetmaster.openstack.org' {
node 'puppetmaster.openstack.org' {
class { 'openstack_project::puppetmaster':
root_rsa_key => hiera('puppetmaster_root_rsa_key', 'XXX'),
update_slave => false,
sysadmins => hiera('sysadmins', []),
version => '3.6.',
}

View File

@ -2,7 +2,6 @@
#
class openstack_project::puppetmaster (
$root_rsa_key,
$update_slave = true,
$sysadmins = [],
$version = '2.7.',
$ca_server = undef,
@ -38,32 +37,27 @@ class openstack_project::puppetmaster (
require => Class['ansible'],
}
if ($update_slave) {
$cron_command = 'bash /opt/config/production/run_all.sh'
logrotate::file { 'updatepuppetmaster':
ensure => present,
log => '/var/log/puppet_run_all.log',
options => ['compress',
'copytruncate',
'delaycompress',
'missingok',
'rotate 7',
'daily',
'notifempty',
],
require => Cron['updatepuppetmaster'],
}
} else {
$cron_command = 'sleep $((RANDOM\%600)) && cd /opt/config/production && git fetch -q && git reset -q --hard @{u} && ./install_modules.sh && touch manifests/site.pp'
}
cron { 'updatepuppetmaster':
user => 'root',
minute => '*/15',
command => $cron_command,
command => 'bash /opt/config/production/run_all.sh',
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',
}
logrotate::file { 'updatepuppetmaster':
ensure => present,
log => '/var/log/puppet_run_all.log',
options => ['compress',
'copytruncate',
'delaycompress',
'missingok',
'rotate 7',
'daily',
'notifempty',
],
require => Cron['updatepuppetmaster'],
}
cron { 'deleteoldreports':
user => 'root',
hour => '3',