From 4298cfdb25c5c67316c064724403c0aec76f7806 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 5 Nov 2010 01:04:35 +0000 Subject: - refactor the vhost setting, and clean it --- modules/mga-mirrors/manifests/init.pp | 6 ++++-- modules/mga-mirrors/templates/mirrors_vhost.conf | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/mga-mirrors/manifests/init.pp b/modules/mga-mirrors/manifests/init.pp index 0da8832d..96a4fa7e 100644 --- a/modules/mga-mirrors/manifests/init.pp +++ b/modules/mga-mirrors/manifests/init.pp @@ -1,4 +1,6 @@ class mga-mirrors { + + $vhost = "mirrors.$domain" include apache::mod_fcgid @@ -7,8 +9,8 @@ class mga-mirrors { } # 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, diff --git a/modules/mga-mirrors/templates/mirrors_vhost.conf b/modules/mga-mirrors/templates/mirrors_vhost.conf index 21e4aa0c..33f27513 100644 --- a/modules/mga-mirrors/templates/mirrors_vhost.conf +++ b/modules/mga-mirrors/templates/mirrors_vhost.conf @@ -1,6 +1,5 @@ -NameVirtualHost *:80 - ServerName mirrors.<%= domain %> + ServerName <%= vhost %> # Serve static content directly DocumentRoot /dev/null -- cgit v1.2.1