diff --git a/manifests/site.pp b/manifests/site.pp index 2ea31b767f..88b01d6900 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -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", diff --git a/modules/puppetboot/files/puppetboot.conf b/modules/puppetboot/files/puppetboot.conf new file mode 100644 index 0000000000..67d34a8e07 --- /dev/null +++ b/modules/puppetboot/files/puppetboot.conf @@ -0,0 +1,13 @@ +author "Monty Taylor " +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 + diff --git a/modules/puppetboot/manifests/init.pp b/modules/puppetboot/manifests/init.pp new file mode 100644 index 0000000000..67809f08e8 --- /dev/null +++ b/modules/puppetboot/manifests/init.pp @@ -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", + ], + } +}