Add upstart script to update puppet on boot.
Change-Id: I42e45aac4aae9abf2ace051d53112ae6b0d8d0a9
This commit is contained in:
parent
a235677c23
commit
527eddbb77
@ -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",
|
||||
|
13
modules/puppetboot/files/puppetboot.conf
Normal file
13
modules/puppetboot/files/puppetboot.conf
Normal 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
|
||||
|
11
modules/puppetboot/manifests/init.pp
Normal file
11
modules/puppetboot/manifests/init.pp
Normal 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",
|
||||
],
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user