[Mageia-sysadm] [576] add support for ldap search filter, to be used in sympa scenari for filtering

root at mageia.org root at mageia.org
Fri Dec 10 21:17:43 CET 2010


Revision: 576
Author:   misc
Date:     2010-12-10 21:17:43 +0100 (Fri, 10 Dec 2010)
Log Message:
-----------
add support for ldap search filter, to be used in sympa scenari for filtering

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

Added Paths:
-----------
    puppet/modules/sympa/templates/group.ldap

Modified: puppet/modules/sympa/manifests/init.pp
===================================================================
--- puppet/modules/sympa/manifests/init.pp	2010-12-10 20:17:41 UTC (rev 575)
+++ puppet/modules/sympa/manifests/init.pp	2010-12-10 20:17:43 UTC (rev 576)
@@ -75,13 +75,25 @@
             source => "svn://svn.mageia.org/svn/web/templates/sympa/trunk"
         }
 
-        file { ["/etc/sympa/lists_xml/","/etc/sympa/data_sources/"]:
+        file { ["/etc/sympa/lists_xml/",
+                "/etc/sympa/data_sources/",
+                "/etc/sympa/search_filters/"]:
             ensure => directory,
             owner => root,
             group => root,
             mode => 755,
         }
 
+        define ldap_search_filter {
+            file { "/etc/sympa/search_filters/ldap-$name.ldap":
+                ensure => present,
+                owner => root,
+                group => root,
+                mode => 755,
+                content => template('sympa/group.ldap') 
+            }
+        }
+
         define ldap_group_datasource {
             file { "/etc/sympa/data_sources/ldap-$name.incl":
                 ensure => present,
@@ -97,6 +109,8 @@
         ldap_group_datasource { "mga-sysadm": }
         ldap_group_datasource { "mga-ml_moderators": }
 
+        ldap_search_filter { "mga-board": }
+
         # directory that will hold the list data
         # i am not sure of the name ( misc, 09/12/10 )
         file { "/var/lib/sympa/expl/":

Added: puppet/modules/sympa/templates/group.ldap
===================================================================
--- puppet/modules/sympa/templates/group.ldap	                        (rev 0)
+++ puppet/modules/sympa/templates/group.ldap	2010-12-10 20:17:43 UTC (rev 576)
@@ -0,0 +1,4 @@
+host        ldap.<%= domain %>:389
+suffix      ou=People,<%= dc_suffix %>
+filter      (&(mail = [sender])(memberOf=cn=<%= name %>,ou=Group,<%= dc_suffix %>))
+scope       sub
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101210/a7a91c0d/attachment-0001.html>


More information about the Mageia-sysadm mailing list