summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2012-02-04 15:27:04 +0100
committerintrigeri <intrigeri@boum.org>2012-02-04 15:27:04 +0100
commit01d03ee604fc54a9dd8ea0e530e97872a3a43363 (patch)
tree23d82bb147cfa937337688b6320cd7fda9b8bb5f
parent0fa9135bb3f97426564cf403c66000225d86a7f1 (diff)
Allow opting-out of conf/incoming's and conf/distributions' content management.
Sometimes it's much simpler to manage these files outside of Puppet.
-rw-r--r--README9
-rw-r--r--manifests/init.pp26
2 files changed, 31 insertions, 4 deletions
diff --git a/README b/README
index b045065..23b3765 100644
--- a/README
+++ b/README
@@ -1,6 +1,15 @@
Variables
=========
+$reprepro_manage_distributions_conf, $reprepro_manage_incoming_conf
+-------------------------------------------------------------------
+
+If true, the content of -respectively- the conf/distributions and
+conf/incoming files is managed by this module. Else, only the
+existence, ownership and permissions are.
+
+Default: true.
+
$reprepro_incoming_mode
-----------------------
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,