From e79a66a57ac3dfef9e1d6c37e82692f3483e2646 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Thu, 5 Apr 2012 14:15:14 +0100 Subject: [PATCH] more messing about Signed-off-by: Stephen Gran --- modules/apache2/manifests/site.pp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/modules/apache2/manifests/site.pp b/modules/apache2/manifests/site.pp index 34292384e..263c6d8a6 100644 --- a/modules/apache2/manifests/site.pp +++ b/modules/apache2/manifests/site.pp @@ -1,6 +1,6 @@ define apache2::site ( $config = undef, - $template = undef, + $template = false, $ensure = present, $site = undef ) { @@ -25,19 +25,22 @@ define apache2::site ( default => err ( "Unknown ensure value: '$ensure'" ), } - if $template { - file { $target: - ensure => $ensure, - content => template($template), - require => Package['apache2'], - notify => Service['apache2'], + case $template { + false: { + file { $target: + ensure => $ensure, + source => $config, + require => Package['apache2'], + notify => Service['apache2'], + } } - } else { - file { $target: - ensure => $ensure, - source => $config, - require => Package['apache2'], - notify => Service['apache2'], + default: { + file { $target: + ensure => $ensure, + content => template($template), + require => Package['apache2'], + notify => Service['apache2'], + } } } -- 2.20.1