1 |
class sympa { |
class sympa { |
2 |
class server { |
class variable { |
3 |
|
$vhost = "ml.$domain" |
4 |
|
} |
5 |
|
|
6 |
|
class server inherits variable { |
7 |
# perl-CGI-Fast is needed for fast cgi |
# perl-CGI-Fast is needed for fast cgi |
8 |
# perl-Socket6 is required by perl-IO-Socket-SSL |
# perl-Socket6 is required by perl-IO-Socket-SSL |
9 |
# (optional requirement) |
# (optional requirement) |
53 |
webapp_file => "sympa/webapp_sympa.conf", |
webapp_file => "sympa/webapp_sympa.conf", |
54 |
} |
} |
55 |
|
|
56 |
apache::vhost_redirect_ssl { "ml.$domain": } |
apache::vhost_redirect_ssl { "$vhost": } |
57 |
|
|
58 |
apache::vhost_other_app { "ml.$domain": |
apache::vhost_other_app { "$vhost": |
59 |
vhost_file => "sympa/vhost_ml.conf", |
vhost_file => "sympa/vhost_ml.conf", |
60 |
} |
} |
61 |
|
|
62 |
openssl::self_signed_cert{ "ml.$domain": |
openssl::self_signed_cert{ "$vhost": |
63 |
directory => "/etc/ssl/apache/" |
directory => "/etc/ssl/apache/" |
64 |
} |
} |
65 |
|
|
84 |
|
|
85 |
define list($subject, $profile, $language = 'en') { |
define list($subject, $profile, $language = 'en') { |
86 |
|
|
87 |
|
include sympa::variable |
88 |
|
|
89 |
$xml_file = "/etc/sympa/lists_xml/$name.xml" |
$xml_file = "/etc/sympa/lists_xml/$name.xml" |
90 |
|
|
91 |
file { "$xml_file": |
file { "$xml_file": |
94 |
content => template('sympa/list.xml') |
content => template('sympa/list.xml') |
95 |
} |
} |
96 |
|
|
97 |
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": |
98 |
refreshonly => true, |
refreshonly => true, |
99 |
subscribe => File["$xml_file"] |
subscribe => File["$xml_file"] |
100 |
} |
} |