From: Stephen Gran Date: Thu, 5 Apr 2012 13:15:14 +0000 (+0100) Subject: more messing about X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=e79a66a57ac3dfef9e1d6c37e82692f3483e2646;p=mirror%2Fdsa-puppet.git more messing about Signed-off-by: Stephen Gran --- 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'], + } } }