[Mageia-sysadm] [97] - refactor the vhost

root at mageia.org root at mageia.org
Thu Nov 4 18:51:06 CET 2010


Revision: 97
Author:   misc
Date:     2010-11-04 18:51:05 +0100 (Thu, 04 Nov 2010)
Log Message:
-----------
- refactor the vhost
- fix the url used for svn checkout
- add a requires from catdap config to svn checkout for ordering purpose
- move extlookup call outside of template
- fix the name of apache config file
- fix the naming of the ldap server  

Modified Paths:
--------------
    puppet/modules/catdap/manifests/init.pp
    puppet/modules/catdap/templates/catdap_local.yml
    puppet/modules/catdap/templates/catdap_vhost.conf

Modified: puppet/modules/catdap/manifests/init.pp
===================================================================
--- puppet/modules/catdap/manifests/init.pp	2010-11-04 17:42:21 UTC (rev 96)
+++ puppet/modules/catdap/manifests/init.pp	2010-11-04 17:51:05 UTC (rev 97)
@@ -5,6 +5,7 @@
     include apache::mod_fcgid
 
     $catdap_location = "/var/www/identity"
+    $catdap_vhost = "identity.$domain"
 
     # TODO switch to a proper rpm packaging
     $rpm_requirement = ['perl-Catalyst-Runtime', 
@@ -19,7 +20,7 @@
     }
 
     subversion::snapshot { $catdap_location:
-        source =>   "svn+ssh://svn.mageia.org/srv/mx2-dd0/svn/soft/identity/CatDap/branches/live"
+        source => "svn://svn.mageia.org/soft/identity/CatDap/branches/live"
     }
 
     # add a catdap config file
@@ -27,12 +28,14 @@
         ensure => present,
         owner => apache,
         mode => 600,
-        content => template("catdap/catdap_local.yml") 
+        content => template("catdap/catdap_local.yml"),
+        require => Subversion::Snapshot[$catdap_location]
     }
 
+    $catdap_password = extlookup('catdap_password')
     # add a apache vhost
-    file { "identity.$domain.conf":
-        path => "/etc/httpd/conf/vhosts.d/$name",
+    file { "$catdap_vhost.conf":
+        path => "/etc/httpd/conf/vhosts.d/$catdap_vhost.conf",
         ensure => "present",
         owner => root,
         group => root,

Modified: puppet/modules/catdap/templates/catdap_local.yml
===================================================================
--- puppet/modules/catdap/templates/catdap_local.yml	2010-11-04 17:42:21 UTC (rev 96)
+++ puppet/modules/catdap/templates/catdap_local.yml	2010-11-04 17:51:05 UTC (rev 97)
@@ -3,9 +3,9 @@
 
 dc_suffix = 'dc=' + domain.gsub('.',',dc=')
 
-ldap_server = 'ldap' + domain
+ldap_server = 'ldap.' + domain
 
-ldap_password = extlookup('catdap_password')
+ldap_password = catdap_password
 
 ldap_account = 'cn=catdap-valstar,ou=System Accounts,' + dc_suffix
 %>

Modified: puppet/modules/catdap/templates/catdap_vhost.conf
===================================================================
--- puppet/modules/catdap/templates/catdap_vhost.conf	2010-11-04 17:42:21 UTC (rev 96)
+++ puppet/modules/catdap/templates/catdap_vhost.conf	2010-11-04 17:51:05 UTC (rev 97)
@@ -1,5 +1,5 @@
 <VirtualHost *:80>
-        ServerName identity.<%= domain %>
+        ServerName <%= catdap_vhost %>
         # Serve static content directly
         DocumentRoot  <%= catdap_location %>/root
         Alias /static <%= catdap_location %>/root/static
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101104/3ce91e85/attachment.html>


More information about the Mageia-sysadm mailing list