summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorTails developers <tails@boum.org>2012-10-23 16:03:28 +0200
committerintrigeri <intrigeri@boum.org>2012-10-25 13:44:42 +0200
commit1ab51064d9a10a10f1adbb1c15069107247c2312 (patch)
treeb404636e9276e6a25123e318a8df75b6535cf1ee /manifests
parentb3ea67d228a9b032372a1016246f6ff35273050f (diff)
Split reprepro::cron and reprepro::inotify to separate files
Diffstat (limited to 'manifests')
-rw-r--r--manifests/cron.pp8
-rw-r--r--manifests/init.pp47
-rw-r--r--manifests/inotify.pp37
3 files changed, 45 insertions, 47 deletions
diff --git a/manifests/cron.pp b/manifests/cron.pp
new file mode 100644
index 0000000..1fae59e
--- /dev/null
+++ b/manifests/cron.pp
@@ -0,0 +1,8 @@
+class reprepro::cron inherits reprepro {
+ cron { reprepro:
+ command => "/usr/bin/reprepro --silent -b $basedir processincoming incoming",
+ user => reprepro,
+ minute => '*/5',
+ require => [ Package['reprepro'], File["$basedir/conf/distributions"] ]
+ }
+}
diff --git a/manifests/init.pp b/manifests/init.pp
index cccc34c..77a014d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -156,50 +156,3 @@ class reprepro {
# TODO: setup needeed lines in apache site config file
}
-
-class reprepro::cron inherits reprepro {
- cron { reprepro:
- command => "/usr/bin/reprepro --silent -b $basedir processincoming incoming",
- user => reprepro,
- minute => '*/5',
- require => [ Package['reprepro'], File["$basedir/conf/distributions"] ]
- }
-}
-
-class reprepro::inotify inherits reprepro {
- case $lsbdistcodename {
- etch: {
- package {
- "inoticoming": ensure => '0.2.0-1~bpo40+1';
- }
- }
- default: {
- package {
- "inoticoming": ensure => 'installed';
- }
- }
- }
- file { "/etc/init.d/reprepro":
- owner => root, group => root, mode => 0755,
- source => "puppet://$server/modules/reprepro/inoticoming.init";
- }
- file { "/etc/default/reprepro":
- ensure => present,
- owner => root, group => root, mode => 0755,
- content => template('reprepro/inoticoming.default.erb'),
- }
-
- exec { "reprepro_init_script":
- command => "/usr/sbin/update-rc.d reprepro defaults",
- unless => "/bin/ls /etc/rc3.d/ | /bin/grep reprepro",
- require => File["/etc/init.d/reprepro"],
- }
- service { "reprepro":
- ensure => "running",
- pattern => "inoticoming.*reprepro.*processincoming",
- hasstatus => false,
- require => [File["/etc/default/reprepro"],
- Exec["reprepro_init_script"],
- File["/etc/init.d/reprepro"] ],
- }
-}
diff --git a/manifests/inotify.pp b/manifests/inotify.pp
new file mode 100644
index 0000000..f3b8c62
--- /dev/null
+++ b/manifests/inotify.pp
@@ -0,0 +1,37 @@
+class reprepro::inotify inherits reprepro {
+ case $lsbdistcodename {
+ etch: {
+ package {
+ "inoticoming": ensure => '0.2.0-1~bpo40+1';
+ }
+ }
+ default: {
+ package {
+ "inoticoming": ensure => 'installed';
+ }
+ }
+ }
+ file { "/etc/init.d/reprepro":
+ owner => root, group => root, mode => 0755,
+ source => "puppet://$server/modules/reprepro/inoticoming.init";
+ }
+ file { "/etc/default/reprepro":
+ ensure => present,
+ owner => root, group => root, mode => 0755,
+ content => template('reprepro/inoticoming.default.erb'),
+ }
+
+ exec { "reprepro_init_script":
+ command => "/usr/sbin/update-rc.d reprepro defaults",
+ unless => "/bin/ls /etc/rc3.d/ | /bin/grep reprepro",
+ require => File["/etc/init.d/reprepro"],
+ }
+ service { "reprepro":
+ ensure => "running",
+ pattern => "inoticoming.*reprepro.*processincoming",
+ hasstatus => false,
+ require => [File["/etc/default/reprepro"],
+ Exec["reprepro_init_script"],
+ File["/etc/init.d/reprepro"] ],
+ }
+}