summaryrefslogtreecommitdiff
path: root/manifests/master/update.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/master/update.pp')
-rw-r--r--manifests/master/update.pp28
1 files changed, 28 insertions, 0 deletions
diff --git a/manifests/master/update.pp b/manifests/master/update.pp
new file mode 100644
index 0000000..4d6925c
--- /dev/null
+++ b/manifests/master/update.pp
@@ -0,0 +1,28 @@
+class puppet::master::update {
+ # cron rule to update puppet config repository every 5 minutes
+ cron { "puppet-update":
+ command => "/usr/local/sbin/update-puppet-conf.sh > /dev/null 2>&1",
+ user => puppet,
+ minute => "*/5",
+ ensure => present,
+ require => [ File["/usr/local/sbin/update-puppet-conf.sh"], User["puppet"] ],
+ }
+
+ # and the script to the cron-job above
+ file { "/usr/local/sbin/update-puppet-conf.sh":
+ source => "puppet:///modules/puppet/update-puppet-conf.sh",
+ owner => "puppet",
+ group => "puppet",
+ mode => 0755,
+ ensure => present,
+ }
+
+ # TODO: use a post-update hook instead of the cronjob
+ file { '/var/git/repositories/puppet.git/hooks/post-update':
+ ensure => absent,
+ mode => 0755,
+ owner => gitolite,
+ group => gitolite,
+ source => "puppet:///modules/puppet/post-update.sh",
+ }
+}