]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/cron_puppet/manifests/init.pp
Install OVH vps from scratch
[perso/Immae/Projets/Puppet.git] / modules / cron_puppet / manifests / init.pp
index 1756a0689339ee8e89b2bdcb7573a075702aa354..c9d5a51fbde5ae7df359b20304daa6c849fa9c77 100644 (file)
@@ -1,7 +1,9 @@
-class cron_puppet {
+class cron_puppet (
+  $code_path = "/etc/puppetlabs/code"
+) {
     file { 'post-hook':
         ensure  => file,
-        path    => '/etc/puppetlabs/puppet/.git/hooks/post-merge',
+        path    => "$code_path/.git/hooks/post-merge",
         source  => 'puppet:///modules/cron_puppet/post-merge',
         mode    => '0755',
         owner   => root,
@@ -12,7 +14,7 @@ class cron_puppet {
     }
     cron { 'puppet-apply':
         ensure  => present,
-        command => "cd /etc/puppetlabs/puppet ; /usr/bin/git pull",
+        command => "cd $code_path ; /usr/bin/git pull",
         user    => root,
         minute  => '*/30',
         require => File['post-hook'],