diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-02-04 18:04:25 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-02-04 18:04:25 -0200 |
commit | 9e9e2d3ed08f650cbd417c56c6ddd0eacd4f4e9b (patch) | |
tree | ace0f9570340ae9bcdbb780263dcd1ceb5292120 | |
parent | d5fe3bfac9c52daac225d1c8ae3faf32de029040 (diff) | |
download | puppet-apache-9e9e2d3ed08f650cbd417c56c6ddd0eacd4f4e9b.tar.gz puppet-apache-9e9e2d3ed08f650cbd417c56c6ddd0eacd4f4e9b.tar.bz2 |
Managing default vhost definition
-rw-r--r-- | manifests/init.pp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 8a1fe1c..9b56512 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -34,6 +34,10 @@ class apache { '': { $apache_www_folder = "/var/www" } } + case $apache_default_folder { + '': { $apache_default_folder = "/var/www" } + } + case $apache_sites_folder { '': { $apache_sites_folder = "${apache_www_folder}/sites" } } @@ -94,6 +98,16 @@ class apache { notify => Service["apache"], } + # default site configuration + file { "${apache2_sites}-available/default": + ensure => present, + content => template('apache/default.erb'), + owner => root, + group => root, + mode => 0644, + notify => Service["apache"], + } + define site($ensure = present, $docroot = false, $redirect = false, $redirect_match = false, $protocol = 'http', $aliases = false, $server_alias = false, $use = false, $ticket = false, |