diff options
author | Michael Scherer <misc@mageia.org> | 2010-12-13 23:54:58 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2010-12-13 23:54:58 +0000 |
commit | bafdc0d1e2cd17cbf039df1ccbdc7de912c4e9c5 (patch) | |
tree | 51668b4826167375b1eb2124011882e5f9ab65b5 /modules/sympa | |
parent | 47be17069f8187fe86c75d509e97f5118db5eeb5 (diff) | |
download | puppet-bafdc0d1e2cd17cbf039df1ccbdc7de912c4e9c5.tar puppet-bafdc0d1e2cd17cbf039df1ccbdc7de912c4e9c5.tar.gz puppet-bafdc0d1e2cd17cbf039df1ccbdc7de912c4e9c5.tar.bz2 puppet-bafdc0d1e2cd17cbf039df1ccbdc7de912c4e9c5.tar.xz puppet-bafdc0d1e2cd17cbf039df1ccbdc7de912c4e9c5.zip |
manage configuration of the list after creating the list
Diffstat (limited to 'modules/sympa')
-rw-r--r-- | modules/sympa/manifests/init.pp | 20 | ||||
-rw-r--r-- | modules/sympa/templates/config | 87 |
2 files changed, 105 insertions, 2 deletions
diff --git a/modules/sympa/manifests/init.pp b/modules/sympa/manifests/init.pp index 4e6fe27c..18481764 100644 --- a/modules/sympa/manifests/init.pp +++ b/modules/sympa/manifests/init.pp @@ -121,7 +121,14 @@ class sympa { } } - define list($subject, $profile, $language = 'en') { + define list($subject, + $profile = false, + $language = 'en', + $reply_to = false, + $sender_email = false, + $sender_ldap_group = false, + $subscriber_ldap_group = false, + $public_archive = true ) { include sympa::variable @@ -135,7 +142,16 @@ class sympa { exec { "sympa.pl --create_list --robot=$sympa::variable::vhost --input_file=$xml_file": refreshonly => true, - subscribe => File["$xml_file"] + subscribe => File["$xml_file"], + before => File["/var/lib/sympa/expl/$name/config"], + } + + file { "/var/lib/sympa/expl/$name/config": + ensure => present, + owner => sympa, + group => sympa, + mode => 750, + content => template("sympa/config"), } } } diff --git a/modules/sympa/templates/config b/modules/sympa/templates/config new file mode 100644 index 00000000..177e963d --- /dev/null +++ b/modules/sympa/templates/config @@ -0,0 +1,87 @@ +subject <%= subject %> + +status open + +visibility noconceal + +lang <%= language %> + +<% if subscriber_ldap_group %> +# TODO check scenari +subscribe closed +unsubscribe closed +<% else %> +subscribe open_web_only_notify +unsubscribe open_web_only_notify +<% end %> + +# TODO reception nomail +# profile normal +owner_include +source mga-sysadm +reception nomail +profile normal + +editor_include +source mga-ml_moderators +reception nomail +profile normal + + +<% if reply_to %> +# TODO +reply_to_header +value other_email +other_email <%= reply_to %> +apply forced +<% end %> + + + +<% if sender_email %> +#TODO write scenari +send restricted_<%= sender_email %> + +<% elsif sender_ldap_group %> +#TODO write scenari +send restricted_<%= sender_ldap_group %> + +<% else %> +#TODO write scenari +send subscriber_moderated + +<% end %> + + +#TODO topics +# topics + +<% if subscriber_ldap_group %> +include_ldap_query + host ldap.<% domain %> + suffix ou=People,<%= dc_suffix %> + timeout 10 + filter (memberOf=<%= subscriber_ldap_group %>)) + attrs mail + select first + scope one +<% end %> + +web_archive + +<% if public_archive %> +#TODO check +access public +<% else %> +#TODO check +access private +<% end %> +archive +access owner +period month + +digest 1,4 13:26 + +review owner + + |