/[adm]/puppet/modules/openldap/templates/init_ldap.sh
ViewVC logotype

Contents of /puppet/modules/openldap/templates/init_ldap.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2324 - (show annotations) (download) (as text)
Sun Jan 22 17:05:51 2012 UTC (10 years, 4 months ago) by misc
File MIME type: application/x-sh
File size: 879 byte(s)
add more group for bootstrapping
1 #!/bin/bash
2
3 ldapadd -Y EXTERNAL -H ldapi:/// <<EOF
4 dn: <%= dc_suffix %>
5 dc: <%= dc_suffix.split(',')[0].split('=')[1] %>
6 objectClass: domain
7 objectClass: domainRelatedObject
8 associatedDomain: <%= domain %>
9
10 <% for g in ['People','Group','Hosts'] %>
11 dn: ou=<%= g%>,<%= dc_suffix %>
12 ou: <%= g %>
13 objectClass: organizationalUnit
14 <% end %>
15
16 <%
17 gid = 5000
18 for g in ['packagers','web','sysadmin','packagers-committers','forum-developers'] %>
19 dn: cn=mga-<%= g %>,ou=Group,<%= dc_suffix %>
20 objectClass: groupOfNames
21 objectClass: posixGroup
22 cn: mga-<%= g %>
23 gidNumber: <%= gid %>
24 member: cn=manager,<%= dc_suffix %>
25 <%-
26 gid+=1
27 end -%>
28
29
30 <% # FIXME automatically get the list of servers
31 for g in ['valstar','alamut'] %>
32 dn: cn=<%= g%>.<%= domain %>,ou=Hosts,<%= dc_suffix %>
33 objectClass: device
34 objectClass: simpleSecurityObject
35 cn: <%= g%>.<%= domain %>
36 userPassword: x
37 <% end %>
38
39
40 EOF

  ViewVC Help
Powered by ViewVC 1.1.28