From 54acfd5febac57db6a03798402585906773d209e Mon Sep 17 00:00:00 2001 From: Antoine Beaupre Date: Wed, 24 Jun 2009 15:13:01 -0400 Subject: add cronjob, fix pgp key publishing --- manifests/init.pp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp index bf50770..ddd61b2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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 -- cgit v1.2.3