aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sympa/manifests
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-12-09 12:34:29 +0000
committerMichael Scherer <misc@mageia.org>2010-12-09 12:34:29 +0000
commitd1d79bcff2edd701cc1c53e88c5f707914a3976c (patch)
tree72aa442da948405cc98dc2f226c2ad34ce9aa998 /modules/sympa/manifests
parent1953cc3f79cdf6c68631571e53415c022d473088 (diff)
downloadpuppet-d1d79bcff2edd701cc1c53e88c5f707914a3976c.tar
puppet-d1d79bcff2edd701cc1c53e88c5f707914a3976c.tar.gz
puppet-d1d79bcff2edd701cc1c53e88c5f707914a3976c.tar.bz2
puppet-d1d79bcff2edd701cc1c53e88c5f707914a3976c.tar.xz
puppet-d1d79bcff2edd701cc1c53e88c5f707914a3976c.zip
- use a variable for the robot and http vhost ( and force https in www
sympa config too )
Diffstat (limited to 'modules/sympa/manifests')
-rw-r--r--modules/sympa/manifests/init.pp16
1 files changed, 11 insertions, 5 deletions
diff --git a/modules/sympa/manifests/init.pp b/modules/sympa/manifests/init.pp
index 3e8dbe8f..9cdb3394 100644
--- a/modules/sympa/manifests/init.pp
+++ b/modules/sympa/manifests/init.pp
@@ -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 @@ class sympa {
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 @@ class sympa {
define list($subject, $profile, $language = 'en') {
+ include sympa::variable
+
$xml_file = "/etc/sympa/lists_xml/$name.xml"
file { "$xml_file":
@@ -88,7 +94,7 @@ class sympa {
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"]
}