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",
- }
}
-
--- /dev/null
+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,
+ }
+}
+