summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-12-24 19:31:31 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-12-24 19:31:31 -0200
commit341a21e01660c4856898c8a7131dce05763e8c6b (patch)
tree4fbb441528e6fb22cf464679f450c5076c63b248 /manifests
parent3d80a9fc39137f235c0527d77acfa4c4e4706624 (diff)
downloadpuppet-apache-341a21e01660c4856898c8a7131dce05763e8c6b.tar.gz
puppet-apache-341a21e01660c4856898c8a7131dce05763e8c6b.tar.bz2
Adding source parameter
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp32
1 files changed, 23 insertions, 9 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 33c8d27..4cdbe02 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -84,15 +84,29 @@ class apache {
define site($ensure = present, $docroot = false, $redirect = false,
$redirect_match = false, $protocol = 'http',
- $server_alias = false, $use = false, $ticket = false) {
- 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"],
+ $server_alias = false, $use = false, $ticket = false,
+ $source = false) {
+
+ if $source {
+ 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"],
+ }
}
$status = $ensure ? {