From 01d03ee604fc54a9dd8ea0e530e97872a3a43363 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 4 Feb 2012 15:27:04 +0100 Subject: Allow opting-out of conf/incoming's and conf/distributions' content management. Sometimes it's much simpler to manage these files outside of Puppet. --- manifests/init.pp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'manifests') 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, -- cgit v1.2.3