From 81ee44c1a4fe862e1a65ef41193486cc99dc7f16 Mon Sep 17 00:00:00 2001 From: Tails developers Date: Tue, 23 Oct 2012 18:01:46 +0200 Subject: Leave more control to users when conf/distributions is not managed If we do not manage conf/distributions, we should not call reprepro ourselves, the caller may change its content at other times than Puppet. We also should not enforce its permissions. --- manifests/init.pp | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp index c4b6850..b1ca7d4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -84,7 +84,7 @@ class reprepro { mode => 0775, owner => reprepro, group => reprepro; "$basedir/conf/distributions": - mode => 0664, owner => root, group => reprepro; + ensure => present; "$basedir/conf/uploaders": mode => 0660, owner => root, group => reprepro, @@ -115,7 +115,23 @@ class reprepro { if $reprepro_manage_distributions_conf { File["$basedir/conf/distributions"] { - content => template("reprepro/distributions.erb") + owner => root, + group => reprepro, + mode => 0664, + content => template("reprepro/distributions.erb"), + } + + exec { + "reprepro -b $basedir createsymlinks": + refreshonly => true, + subscribe => File["$basedir/conf/distributions"], + user => reprepro, + path => "/usr/bin:/bin"; + "reprepro -b $basedir export": + refreshonly => true, + user => reprepro, + subscribe => File["$basedir/conf/distributions"], + path => "/usr/bin:/bin"; } } @@ -125,17 +141,8 @@ class reprepro { } } + exec { - "reprepro -b $basedir createsymlinks": - refreshonly => true, - subscribe => File["$basedir/conf/distributions"], - user => reprepro, - path => "/usr/bin:/bin"; - "reprepro -b $basedir export": - refreshonly => true, - user => reprepro, - subscribe => File["$basedir/conf/distributions"], - path => "/usr/bin:/bin"; "/usr/local/bin/reprepro-export-key": creates => "$basedir/key.asc", user => reprepro, -- cgit v1.2.3