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:
@ -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 {
|
||||
|
@ -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",
|
||||
|
Reference in New Issue
Block a user