summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp12
1 files changed, 10 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index b909686..9dee680 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -76,12 +76,20 @@ class etherpad(
require => Vcsrepo['/var/lib/etherpad-lite'],
}
+ $directory = $ensure ? {
+ 'present' => 'directory',
+ default => 'absent',
+ }
+
file { '/var/log/etherpad-lite':
- ensure => directory,
+ ensure => $directory,
owner => 'etherpad-lite',
group => 'etherpad-lite',
mode => 0755,
- require => [ User['etherpad-lite'], Group['etherpad-lite'] ],
+ require => $ensure ? {
+ present => [ User['etherpad-lite'], Group['etherpad-lite'] ],
+ default => undef,
+ },
}
file { '/etc/logrotate.d/etherpad-lite':