aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-01-22 16:25:59 +0000
committerMichael Scherer <misc@mageia.org>2012-01-22 16:25:59 +0000
commit47e50829f35c6577f9edb596b6cd595ca1aa2726 (patch)
treeb8b051abb09d9bfa3876ec83f5e407a369f88dae /modules
parent9873b28dbfaf1311845ba58397c3d31aa3cfb84a (diff)
downloadpuppet-47e50829f35c6577f9edb596b6cd595ca1aa2726.tar
puppet-47e50829f35c6577f9edb596b6cd595ca1aa2726.tar.gz
puppet-47e50829f35c6577f9edb596b6cd595ca1aa2726.tar.bz2
puppet-47e50829f35c6577f9edb596b6cd595ca1aa2726.tar.xz
puppet-47e50829f35c6577f9edb596b6cd595ca1aa2726.zip
refactor the declaration of group with a for loop
Diffstat (limited to 'modules')
-rw-r--r--modules/openldap/templates/init_ldap.sh22
1 files changed, 13 insertions, 9 deletions
diff --git a/modules/openldap/templates/init_ldap.sh b/modules/openldap/templates/init_ldap.sh
index 8f703fb0..ecc27cf5 100644
--- a/modules/openldap/templates/init_ldap.sh
+++ b/modules/openldap/templates/init_ldap.sh
@@ -7,19 +7,23 @@ objectClass: domain
objectClass: domainRelatedObject
associatedDomain: <%= domain %>
-dn: ou=People,<%= dc_suffix %>
-ou: People
+<% for g in ['People','Group'] %>
+dn: ou=<%= g%>,<%= dc_suffix %>
+ou: <%= g %>
objectClass: organizationalUnit
+<% end %>
-dn: ou=Group,<%= dc_suffix %>
-ou: Group
-objectClass: organizationalUnit
-
-dn: cn=mga-packagers,ou=Group,<%= dc_suffix %>
+<%
+gid = 5000
+for g in ['packagers','web','sysadmin'] %>
+dn: cn=mga-<% g %>,ou=Group,<%= dc_suffix %>
objectClass: groupOfNames
objectClass: posixGroup
-cn: mga-packagers
-gidNumber: 5003
+cn: mga-<% g %>
+gidNumber: <%= gid %>
member: cn=manager,<%= dc_suffix %>
+<%-
+gid+=1
+end -%>
EOF