[Mageia-sysadm] [580] manage configuration of the list after creating the list

root at mageia.org root at mageia.org
Tue Dec 14 00:54:59 CET 2010


Revision: 580
Author:   misc
Date:     2010-12-14 00:54:58 +0100 (Tue, 14 Dec 2010)
Log Message:
-----------
manage configuration of the list after creating the list

Modified Paths:
--------------
    puppet/modules/sympa/manifests/init.pp

Added Paths:
-----------
    puppet/modules/sympa/templates/config

Modified: puppet/modules/sympa/manifests/init.pp
===================================================================
--- puppet/modules/sympa/manifests/init.pp	2010-12-13 23:54:57 UTC (rev 579)
+++ puppet/modules/sympa/manifests/init.pp	2010-12-13 23:54:58 UTC (rev 580)
@@ -121,7 +121,14 @@
         }
     }
 
-    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,8 +142,17 @@
 
         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"), 
+        }
     }
 }
 

Added: puppet/modules/sympa/templates/config
===================================================================
--- puppet/modules/sympa/templates/config	                        (rev 0)
+++ puppet/modules/sympa/templates/config	2010-12-13 23:54:58 UTC (rev 580)
@@ -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
+
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101214/98b3c2c5/attachment.html>


More information about the Mageia-sysadm mailing list