/[adm]/puppet/modules/sympa/manifests/list.pp
ViewVC logotype

Contents of /puppet/modules/sympa/manifests/list.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2623 - (show annotations) (download)
Mon Mar 19 16:58:35 2012 UTC (12 years, 1 month ago) by misc
File size: 1849 byte(s)
fix typo
1 define sympa::list( $subject,
2 $profile = false,
3 $language = 'en',
4 $topics = false,
5 $reply_to = false,
6 $sender_email = false,
7 $sender_ldap_group = false,
8 $subscriber_ldap_group = false,
9 $public_archive = true,
10 $subscription_open = false) {
11
12 include sympa::variable
13 $ldap_password = extlookup('sympa_ldap','x')
14 $custom_subject = $name
15
16 $xml_file = "/etc/sympa/lists_xml/$name.xml"
17
18 if $sender_email {
19 $sender_email_file = regsubst($sender_email,'\@','-at-')
20 } else {
21 $sender_email_file = ''
22 }
23
24 file { $xml_file:
25 content => template('sympa/list.xml'),
26 require => Package[sympa],
27 }
28
29 exec { "sympa.pl --create_list --robot=$sympa::variable::vhost --input_file=$xml_file":
30 require => File[$xml_file],
31 creates => "/var/lib/sympa/expl/$name",
32 before => File["/var/lib/sympa/expl/$name/config"],
33 }
34
35 file { "/var/lib/sympa/expl/$name/config":
36 owner => 'sympa',
37 group => 'sympa',
38 mode => '0750',
39 content => template('sympa/config'),
40 notify => Service['sympa'],
41 }
42
43 if $sender_ldap_group {
44 if ! defined(Sympa::Scenario::Sender_ldap_group[$sender_ldap_group]) {
45 sympa::scenario::sender_ldap_group { $sender_ldap_group: }
46 }
47 }
48
49 if $sender_email {
50 if ! defined(Sympa::Scenario::Sender_email[$sender_email]) {
51 sympa::scenario::sender_email { $sender_email: }
52 }
53 }
54
55 if $subscriber_ldap_group {
56 if ! defined(Sympa::Search_filter::Ldap[$subscriber_ldap_group]) {
57 sympa::search_filter::ldap { $subscriber_ldap_group: }
58 }
59 }
60 }
61
62

  ViewVC Help
Powered by ViewVC 1.1.30