From 6717b36af2e08b24e33a8af836ec7afa9d23819d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Jan 2010 22:08:18 -0200 Subject: Fix if instance is absent --- manifests/init.pp | 23 ++++++++++++++--------- 1 file 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, + } + } } } } -- cgit v1.2.3