summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-09 15:09:48 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-09 15:09:48 -0300
commitb9c9a3b9c7b7b54224a509a376435858db255399 (patch)
tree4bf6bd7701af8a2c3bddfd705f56851ccbfc80d3
parent83474b6a09f8579f484ae11012727a1d261cc01c (diff)
downloadpuppet-etherpad-b9c9a3b9c7b7b54224a509a376435858db255399.tar.gz
puppet-etherpad-b9c9a3b9c7b7b54224a509a376435858db255399.tar.bz2
Fixing requirements when the service is absent (2)
-rw-r--r--manifests/init.pp9
1 files changed, 8 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index d517449..b909686 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -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':