From bafdc0d1e2cd17cbf039df1ccbdc7de912c4e9c5 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Mon, 13 Dec 2010 23:54:58 +0000 Subject: manage configuration of the list after creating the list --- modules/sympa/manifests/init.pp | 20 +++++++++- modules/sympa/templates/config | 87 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 modules/sympa/templates/config (limited to 'modules') 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 + + -- cgit v1.2.1