diff options
author | Tails developers <tails@boum.org> | 2012-10-23 18:01:46 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2012-10-25 13:17:39 +0200 |
commit | 81ee44c1a4fe862e1a65ef41193486cc99dc7f16 (patch) | |
tree | 2c3741a70daa781c23f000828a0b18f3fb532051 /manifests/init.pp | |
parent | 8bb6499572fd1c1a05c033f85bc36b556d9ba629 (diff) |
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.
Diffstat (limited to 'manifests/init.pp')
-rw-r--r-- | manifests/init.pp | 31 |
1 files changed, 19 insertions, 12 deletions
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, |