diff options
author | Michael Scherer <misc@mageia.org> | 2010-12-10 20:17:43 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2010-12-10 20:17:43 +0000 |
commit | 98f9b03aa036bb5cb4b58c9bfeebe98f2f3dafa1 (patch) | |
tree | e232c305cf5d4daaac1df2abc124c786d4308a7e | |
parent | 3ede46ab2aec44bf7f721c73eeaf547002faf5fc (diff) | |
download | puppet-98f9b03aa036bb5cb4b58c9bfeebe98f2f3dafa1.tar puppet-98f9b03aa036bb5cb4b58c9bfeebe98f2f3dafa1.tar.gz puppet-98f9b03aa036bb5cb4b58c9bfeebe98f2f3dafa1.tar.bz2 puppet-98f9b03aa036bb5cb4b58c9bfeebe98f2f3dafa1.tar.xz puppet-98f9b03aa036bb5cb4b58c9bfeebe98f2f3dafa1.zip |
add support for ldap search filter, to be used in sympa scenari for filtering
-rw-r--r-- | modules/sympa/manifests/init.pp | 16 | ||||
-rw-r--r-- | modules/sympa/templates/group.ldap | 4 |
2 files changed, 19 insertions, 1 deletions
diff --git a/modules/sympa/manifests/init.pp b/modules/sympa/manifests/init.pp index ab88e42b..350bbb1b 100644 --- a/modules/sympa/manifests/init.pp +++ b/modules/sympa/manifests/init.pp @@ -75,13 +75,25 @@ class sympa { 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 @@ class sympa { 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/": diff --git a/modules/sympa/templates/group.ldap b/modules/sympa/templates/group.ldap new file mode 100644 index 00000000..bba53d9d --- /dev/null +++ b/modules/sympa/templates/group.ldap @@ -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 |