Revision
123
Author
misc
Date
2010-11-05 02:04:35 +0100 (Fri, 05 Nov 2010)

Log Message

- refactor the vhost setting, and clean it

Modified Paths

Modified: puppet/modules/mga-mirrors/manifests/init.pp
===================================================================
--- puppet/modules/mga-mirrors/manifests/init.pp	2010-11-05 01:01:29 UTC (rev 122)
+++ puppet/modules/mga-mirrors/manifests/init.pp	2010-11-05 01:04:35 UTC (rev 123)
@@ -1,4 +1,6 @@
 class mga-mirrors {
+    
+    $vhost = "mirrors.$domain"
 
     include apache::mod_fcgid
 
@@ -7,8 +9,8 @@
     }
 
     # add a apache vhost
-    file { "mirrors.$domain.conf":
-        path => "/etc/httpd/conf/vhosts.d/$name.$domain.conf",
+    file { "$vhost.conf":
+        path => "/etc/httpd/conf/vhosts.d/$vhost.conf",
         ensure => "present",
         owner => root,
         group => root,

Modified: puppet/modules/mga-mirrors/templates/mirrors_vhost.conf
===================================================================
--- puppet/modules/mga-mirrors/templates/mirrors_vhost.conf	2010-11-05 01:01:29 UTC (rev 122)
+++ puppet/modules/mga-mirrors/templates/mirrors_vhost.conf	2010-11-05 01:04:35 UTC (rev 123)
@@ -1,6 +1,5 @@
-NameVirtualHost *:80
 <VirtualHost *:80>
-        ServerName mirrors.<%= domain %>
+        ServerName <%= vhost %>
         # Serve static content directly
         DocumentRoot  /dev/null