Add upstart script to update puppet on boot.

Change-Id: I42e45aac4aae9abf2ace051d53112ae6b0d8d0a9
This commit is contained in:
Monty Taylor 2012-05-22 13:37:30 -04:00
parent a235677c23
commit 527eddbb77
3 changed files with 25 additions and 0 deletions

View File

@ -4,6 +4,7 @@ $jenkins_ssh_key = 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtioTW2wh3mBRuj+R0Jyb/mLt
class openstack_cron {
include logrotate
include puppetboot
cron { "updatepuppet":
user => root,
minute => "*/15",

View File

@ -0,0 +1,13 @@
author "Monty Taylor <mordred@inaugust.com>"
description "Applying puppet config on boot"
start on runlevel[2345]
script
cd /root/openstack-ci-puppet/modules
/usr/bin/git pull --ff-only
echo "Running puppet on boot" >> /var/log/manifest.log
date >> /var/log/manifest.log
/usr/bin/puppet apply --modulepath=/root/openstack-ci-puppet/modules -l /var/log/manifest.log /root/openstack-ci-puppet/manifests/site.pp
end script

View File

@ -0,0 +1,11 @@
class puppetboot {
file {'/etc/init/puppetboot.conf':
owner => 'root',
group => 'root',
mode => 644,
ensure => 'present',
source => [
"puppet:///modules/puppetboot/puppetboot.conf",
],
}
}