summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-26 10:35:11 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-26 10:35:11 -0200
commitb724f70d0f92e537fe31aad4935912d30f47ab76 (patch)
tree7c417be1bb7747f29fcd94fa8508f2315e7147aa /manifests
parente394cd4247b09efd0e4a5c07e46b73e46027a86a (diff)
downloadpuppet-reprepro-b724f70d0f92e537fe31aad4935912d30f47ab76.tar.gz
puppet-reprepro-b724f70d0f92e537fe31aad4935912d30f47ab76.tar.bz2
Adding reprepro::disabled and reprepro::purged
Diffstat (limited to 'manifests')
-rw-r--r--manifests/cron/disabled.pp6
-rw-r--r--manifests/disabled.pp3
-rw-r--r--manifests/purged.pp69
3 files changed, 72 insertions, 6 deletions
diff --git a/manifests/cron/disabled.pp b/manifests/cron/disabled.pp
index a8bc499..60924a8 100644
--- a/manifests/cron/disabled.pp
+++ b/manifests/cron/disabled.pp
@@ -2,10 +2,4 @@ class reprepro::cron::disabled inherits reprepro::cron {
Cron['reprepro'] {
ensure => absent,
}
-
- Exec["reprepro -b $basedir createsymlinks", "reprepro -b $basedir export",
- "/usr/local/bin/reprepro-export-key", "/usr/local/bin/reprepro-export-key-update"] {
- onlyif => "/bin/false",
- }
}
-
diff --git a/manifests/disabled.pp b/manifests/disabled.pp
new file mode 100644
index 0000000..1d41261
--- /dev/null
+++ b/manifests/disabled.pp
@@ -0,0 +1,3 @@
+class reprepro::disabled(
+ $basedir = '/srv/reprepro'
+) { }
diff --git a/manifests/purged.pp b/manifests/purged.pp
new file mode 100644
index 0000000..b84cffb
--- /dev/null
+++ b/manifests/purged.pp
@@ -0,0 +1,69 @@
+class reprepro::purged(
+ $origin = $::domain,
+ $uploaders = '',
+ $basedir = '/srv/reprepro'
+) {
+
+ $reprepro_origin = $origin
+ $reprepro_uploaders = $uploaders
+
+ user { "reprepro":
+ ensure => absent,
+ }
+
+ group { "reprepro":
+ ensure => absent,
+ }
+
+ file {
+ "$basedir":
+ ensure => absent;
+
+ "$basedir/conf":
+ ensure => absent;
+
+ "$basedir/db":
+ ensure => absent;
+
+ "$basedir/dists":
+ ensure => absent;
+
+ "$basedir/pool":
+ ensure => absent;
+
+ "$basedir/incoming":
+ ensure => absent;
+
+ "$basedir/logs":
+ ensure => absent;
+
+ "$basedir/tmp":
+ ensure => absent;
+
+ "$basedir/conf/distributions":
+ ensure => absent;
+
+ "$basedir/conf/uploaders":
+ ensure => absent;
+
+ "$basedir/conf/incoming":
+ ensure => absent;
+
+ "$basedir/index.html":
+ ensure => absent;
+
+ "$basedir/.gnupg":
+ ensure => absent;
+
+ "$basedir/.gnupg/secring.gpg":
+ ensure => absent;
+
+ "/usr/local/bin/reprepro-export-key":
+ ensure => absent,
+ content => template('reprepro/reprepro-export-key.sh.erb'),
+ owner => root,
+ group => root,
+ mode => 755,
+ }
+}
+