summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp40
1 files changed, 21 insertions, 19 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index cf67556..505a134 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -87,26 +87,28 @@ class apache {
$server_alias = false, $use = false, $ticket = false,
$source = false) {
- if $source != false {
- file { "${apache2_sites}-available/$title":
- ensure => $ensure,
- source => $source,
- owner => root,
- group => root,
- mode => 0644,
- require => File["${apache2_macros}"],
- notify => Service["apache"],
- }
- } else {
- file { "${apache2_sites}-available/$title":
- ensure => $ensure,
- content => template('apache/site.erb'),
- owner => root,
- group => root,
- mode => 0644,
- require => File["${apache2_macros}"],
- notify => Service["apache"],
+ case $source {
+ false: {
+ file { "${apache2_sites}-available/$title":
+ ensure => $ensure,
+ source => $source,
+ owner => root,
+ group => root,
+ mode => 0644,
+ require => File["${apache2_macros}"],
+ notify => Service["apache"],
+ }
}
+ default:
+ file { "${apache2_sites}-available/$title":
+ ensure => $ensure,
+ content => template('apache/site.erb'),
+ owner => root,
+ group => root,
+ mode => 0644,
+ require => File["${apache2_macros}"],
+ notify => Service["apache"],
+ }
}
$status = $ensure ? {