[Mageia-sysadm] [562] - use a variable for the robot and http vhost ( and force https in www

root at mageia.org root at mageia.org
Thu Dec 9 13:34:29 CET 2010


Revision: 562
Author:   misc
Date:     2010-12-09 13:34:29 +0100 (Thu, 09 Dec 2010)
Log Message:
-----------
- use a variable for the robot and http vhost ( and force https in www
  sympa config too )

Modified Paths:
--------------
    puppet/modules/sympa/manifests/init.pp
    puppet/modules/sympa/templates/sympa.conf

Modified: puppet/modules/sympa/manifests/init.pp
===================================================================
--- puppet/modules/sympa/manifests/init.pp	2010-12-09 12:34:28 UTC (rev 561)
+++ puppet/modules/sympa/manifests/init.pp	2010-12-09 12:34:29 UTC (rev 562)
@@ -1,5 +1,9 @@
 class sympa {
-    class server {
+    class variable {
+        $vhost = "ml.$domain"
+    }
+
+    class server inherits variable {
         # perl-CGI-Fast is needed for fast cgi
         # perl-Socket6 is required by perl-IO-Socket-SSL
         #  (optional requirement)
@@ -49,13 +53,13 @@
              webapp_file => "sympa/webapp_sympa.conf",
         }
    
-        apache::vhost_redirect_ssl { "ml.$domain": }
+        apache::vhost_redirect_ssl { "$vhost": }
  
-        apache::vhost_other_app { "ml.$domain":
+        apache::vhost_other_app { "$vhost":
             vhost_file => "sympa/vhost_ml.conf",
         }
 
-        openssl::self_signed_cert{ "ml.$domain":
+        openssl::self_signed_cert{ "$vhost":
             directory => "/etc/ssl/apache/"
         }
     
@@ -80,6 +84,8 @@
 
     define list($subject, $profile, $language = 'en') {
 
+        include sympa::variable
+
         $xml_file = "/etc/sympa/lists_xml/$name.xml"
 
         file { "$xml_file":
@@ -88,7 +94,7 @@
             content => template('sympa/list.xml')    
         }
 
-        exec { "sympa.pl --create_list --robot=ml.$domain --input_file=$xml_file":
+        exec { "sympa.pl --create_list --robot=$sympa::variable::vhost --input_file=$xml_file":
             refreshonly => true,
             subscribe => File["$xml_file"]
         }

Modified: puppet/modules/sympa/templates/sympa.conf
===================================================================
--- puppet/modules/sympa/templates/sympa.conf	2010-12-09 12:34:28 UTC (rev 561)
+++ puppet/modules/sympa/templates/sympa.conf	2010-12-09 12:34:29 UTC (rev 562)
@@ -86,11 +86,11 @@
 ###\\\\ General definition ////###
 
 ## Main robot hostname
-domain  ml.<%= domain %>
+domain  <%= vhost %>
 
 ## Listmasters email list comma separated
 ## Sympa will associate listmaster privileges to these email addresses (mail and web interfaces). Some error reports may also be sent to these addresses.
-listmaster      listmaster at ml.<%= domain %>
+listmaster      listmaster@<%= vhost %>
 
 ## Local part of sympa email adresse
 ## Effective address will be \[EMAIL\]@\[HOST\]
@@ -278,7 +278,7 @@
 ###\\\\ Web interface ////###
 
 ## Sympa's main page URL
-wwsympa_url     http://ml.<%= domain %>/
+wwsympa_url     https://<%= vhost %>/
 
 ## If a spam filter (like spamassassin or j-chkmail) add a smtp headers to tag spams, name of this header (example X-Spam-Status)
 antispam_tag_header_name        X-Spam-Status
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101209/5ea67dbe/attachment.html>


More information about the Mageia-sysadm mailing list