aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-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,
+ }
+ }
}
}
}