diff options
Diffstat (limited to 'manifests/init.pp')
-rw-r--r-- | manifests/init.pp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index a98bb2c..8268c8c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,5 +1,13 @@ class reprepro { + case $reprepro_manage_distributions_conf { + '': { $reprepro_manage_distributions_conf = true } + } + + case $reprepro_manage_incoming_conf { + '': { $reprepro_manage_incoming_conf = true } + } + case $reprepro_origin { '': { $reprepro_origin = $domain } } @@ -80,16 +88,14 @@ class reprepro { mode => 0775, owner => reprepro, group => reprepro; "$basedir/conf/distributions": - mode => 0664, owner => root, group => reprepro, - content => template("reprepro/distributions.erb"); + mode => 0664, owner => root, group => reprepro; "$basedir/conf/uploaders": mode => 0660, owner => root, group => reprepro, content => template("reprepro/uploaders.erb"); "$basedir/conf/incoming": - mode => 0664, owner => root, group => reprepro, - source => "puppet://$server/modules/reprepro/incoming"; + mode => 0664, owner => root, group => reprepro; "$basedir/index.html": mode => 0664, owner => root, group => reprepro, @@ -111,6 +117,18 @@ class reprepro { mode => 755, } + if $reprepro_manage_distributions_conf { + File["$basedir/conf/distributions"] { + content => template("reprepro/distributions.erb") + } + } + + if $reprepro_manage_incoming_conf { + File["$basedir/conf/incoming"] { + source => "puppet://$server/modules/reprepro/incoming" + } + } + exec { "reprepro -b $basedir createsymlinks": refreshonly => true, |