summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,