]> gitweb.fluxo.info Git - puppet-etherpad.git/commitdiff
Fixing requirements when the service is absent
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 9 Mar 2014 18:02:11 +0000 (15:02 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 9 Mar 2014 18:02:11 +0000 (15:02 -0300)
manifests/init.pp

index 82ce3f8a46bc2ffa9502fa66687b986d5d97e812..d51744996a29c4847eafd05a70240086e436afe6 100644 (file)
@@ -118,7 +118,10 @@ class etherpad(
     ensure     => $service,
     hasrestart => true,
     hasstatus  => true,
-    require    => [ File['/etc/init.d/etherpad-lite', '/var/lib/etherpad-lite/settings.json',
-                         '/home/etherpad-lite'], Mysql_grant['etherpad@%/etherpad'], Package['npm'] ],
+    require    => $ensure ? {
+      present => [ File['/etc/init.d/etherpad-lite', '/var/lib/etherpad-lite/settings.json',
+                        '/home/etherpad-lite'], Mysql_grant['etherpad@%/etherpad'], Package['npm'] ],
+      default => undef,
+    },
   }
 }