Move puppet cron job to global server config.

Remove jenkins user dependency from updatepuppet job.
Add sleep to the beginning of the cron job so that not all
openstack servers hit the git repo and run puppet at once.

Change-Id: Ic5ac6e2a79e1af53e3abb4ca40bea5d03a1cd32c
Reviewed-on: https://review.openstack.org/241
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
James E. Blair 2011-08-15 14:01:28 -07:00 committed by Jenkins
parent 4d39ca5280
commit 0d716c1fe1
2 changed files with 6 additions and 7 deletions

View File

@ -27,6 +27,12 @@ class openstack_base {
"python-setuptools",
"byobu"]
package { $packages: ensure => "latest" }
cron { "updatepuppet":
user => root,
minute => "*/15",
command => "sleep $((RANDOM\%600)) && cd /root/openstack-ci-puppet && /usr/bin/git pull -q && /var/lib/gems/1.8/bin/puppet apply -l /tmp/manifest.log --modulepath=/root/openstack-ci-puppet/modules manifests/site.pp",
}
}
class openstack_server {

View File

@ -13,13 +13,6 @@ class jenkins_slave {
ensure => present,
}
cron { "updatepuppet":
user => root,
minute => "*/15",
command => "cd /root/openstack-ci-puppet && /usr/bin/git pull -q && /var/lib/gems/1.8/bin/puppet apply -l /tmp/manifest.log --modulepath=/root/openstack-ci-puppet/modules manifests/site.pp",
require => [ Jenkinsuser[jenkins] ]
}
cron { "updateci":
user => jenkins,
minute => "*/15",