summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp26
1 files changed, 13 insertions, 13 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 70f6cc2..2167bbb 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -85,10 +85,21 @@ class apache {
define site($ensure = present, $docroot = false, $redirect = false,
$redirect_match = false, $protocol = 'http',
$server_alias = false, $use = false, $ticket = false,
- $source = '') {
+ $source = false) {
case $source {
- '': {
+ true: {
+ file { "${apache2_sites}-available/$title":
+ ensure => $ensure,
+ source => "puppet://$server/files/apache/$name",
+ owner => root,
+ group => root,
+ mode => 0644,
+ require => File["${apache2_macros}"],
+ notify => Service["apache"],
+ }
+ }
+ false: {
file { "${apache2_sites}-available/$title":
ensure => $ensure,
content => template('apache/site.erb'),
@@ -99,17 +110,6 @@ class apache {
notify => Service["apache"],
}
}
- default: {
- file { "${apache2_sites}-available/$title":
- ensure => $ensure,
- source => $source,
- owner => root,
- group => root,
- mode => 0644,
- require => File["${apache2_macros}"],
- notify => Service["apache"],
- }
- }
}
$status = $ensure ? {