]> gitweb.fluxo.info Git - puppet-apache.git/commitdiff
Managing default vhost definition
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 4 Feb 2011 20:04:25 +0000 (18:04 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 4 Feb 2011 20:04:25 +0000 (18:04 -0200)
manifests/init.pp

index 8a1fe1c03673c167aa987fa1fac8a62ed7060d5b..9b56512da754988c8d20047070794905e77176cb 100644 (file)
@@ -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,