[Mageia-sysadm] [123] - refactor the vhost setting, and clean it

root at mageia.org root at mageia.org
Fri Nov 5 02:04:35 CET 2010


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:
--------------
    puppet/modules/mga-mirrors/manifests/init.pp
    puppet/modules/mga-mirrors/templates/mirrors_vhost.conf

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
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101105/65d06fe8/attachment.html>


More information about the Mageia-sysadm mailing list