aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-01-26 22:08:18 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-01-26 22:08:18 -0200
commit6717b36af2e08b24e33a8af836ec7afa9d23819d (patch)
treed8bf948056660d896b9e81161e69d382a5567c5c
parentebc4496c5226c8f73fd4de851237a6f81be32eab (diff)
downloadpuppet-ikiwiki-6717b36af2e08b24e33a8af836ec7afa9d23819d.tar.gz
puppet-ikiwiki-6717b36af2e08b24e33a8af836ec7afa9d23819d.tar.bz2
Fix if instance is absent
-rw-r--r--manifests/init.pp23
1 files changed, 14 insertions, 9 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 4c5392d..2c692ea 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -36,17 +36,17 @@ class ikiwiki {
default => $base_url,
}
- file { "/etc/ikiwiki/$name.setup":
- ensure => $ensure,
- content => template('ikiwiki/ikiwiki.setup.erb'),
- owner => root,
- group => root,
- mode => 644,
- notify => Exec["ikiwiki_refresh_${name}"],
- }
-
case $ensure {
'present': {
+ file { "/etc/ikiwiki/$name.setup":
+ ensure => present,
+ content => template('ikiwiki/ikiwiki.setup.erb'),
+ owner => root,
+ group => root,
+ mode => 644,
+ notify => Exec["ikiwiki_refresh_${name}"],
+ }
+
exec { "ikiwiki_refresh_${name}":
command => "/usr/local/sbin/ikiwiki-refresh $name $instance",
user => root,
@@ -104,6 +104,11 @@ class ikiwiki {
mode => 6550,
}
}
+ 'absent': {
+ file { "/etc/ikiwiki/$name.setup":
+ ensure => absent,
+ }
+ }
}
}
}