]> gitweb.fluxo.info Git - puppet-reprepro.git/commitdiff
add cronjob, fix pgp key publishing
authorAntoine Beaupre <anarcat@koumbit.org>
Wed, 24 Jun 2009 19:13:01 +0000 (15:13 -0400)
committerAntoine Beaupre <anarcat@koumbit.org>
Wed, 24 Jun 2009 19:13:01 +0000 (15:13 -0400)
manifests/init.pp

index bf507705eff077707261cfe668f617a255fce1c8..ddd61b25ca6c5ac60a38471821d088bf2717accd 100644 (file)
@@ -78,19 +78,26 @@ class reprepro {
     ensure => directory;
   }
 
-  exec { "reprepro -b $basedir createsymlinks":
-    refreshonly => true,
-    subscribe => File["$basedir/conf/distributions"],
-    path => "/usr/bin:/bin",
+  exec {
+    "reprepro -b $basedir createsymlinks":
+      refreshonly => true,
+      subscribe => File["$basedir/conf/distributions"],
+      path => "/usr/bin:/bin";
+    "gpg --export -a `gpg --with-colon --list-secret-keys | awk -F ':' '{ print $5 }' | head -1` > $basedir/key.asc":
+      creates => "$basedir/key.asc",
+      subscribe => File["$basedir/.gnupg"],
+      path => "/usr/bin:/bin";
   }
 
-  exec { "gpg --export -a `gpg --with-colon --list-secret-keys | awk -F ':' '{ print $5 }' | head -1` > $basedir/key.asc":
-    creates => "$basedir/key.asc",
-    subscribe => File["$basedir/.gnupg"],
+  cron { reprepro:
+    command => "/usr/bin/reprepro -b $basedir processincoming incoming",
+    user => reprepro,
+    hour => '*',
+    minute => '*/5',
+    require => [ Package['reprepro'], File["$basedir/conf/distributions"] ]
   }
 
 # TODO: additional things this class could do
-# setup inotincoming cronjob
 # ensure it stays running
 # setup needeed lines in apache site config file