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

index d51744996a29c4847eafd05a70240086e436afe6..b9096865e2e7c89d8502ac0433956cadb4703a4a 100644 (file)
@@ -29,13 +29,20 @@ class etherpad(
   group { "etherpad-lite":
     ensure    => $ensure,
     allowdupe => false,
+    require   => $ensure ? {
+      present => undef,
+      default => User['etherpad-lite'], # Make sure the user is removed first
+    }
   }
 
   user { "etherpad-lite":
     ensure    => $ensure,
     allowdupe => false,
     gid       => 'etherpad-lite',
-    require   => Group['etherpad-lite'],
+    require   => $ensure ? {
+      present => Group['etherpad-lite'],
+      default => undef,
+    }
   }
 
   file { '/home/etherpad-lite':