]>
Commit | Line | Data |
---|---|---|
c15f2234 | 1 | \e[0;35m#### Please add this node to LDAP:\e[0m |
54806111 IB |
2 | ldapadd -D "cn=root,<%= @ldap_base %>" -W << 'EOF' |
3 | dn: <%= @ldap_dn %> | |
4 | cn: <%= @ldap_cn %> | |
5 | objectclass: device | |
6 | objectclass: top | |
7 | objectclass: simpleSecurityObject | |
8 | objectclass: puppetClient | |
51ab750f IB |
9 | <%- unless @ips.empty? -%> |
10 | objectclass: ipHost | |
11 | <% unless @ips["v4"].nil? -%>ipHostNumber: <%= @ips["v4"]["ipAddress"] %><%- end %> | |
12 | <% unless @ips["v6"].nil? -%>ipHostNumber: <%= @ips["v6"]["ipAddress"] %>/<%= @ips["v6"]["mask"] %><%- end %> | |
13 | <%- end -%> | |
85abd2fd | 14 | environment: <%= @environment %> |
96cda4dc | 15 | puppetVar: real_hostname=<%= @real_hostname %> |
54806111 IB |
16 | userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %> |
17 | EOF | |
c15f2234 | 18 | \e[0;35m#### Or modify an existing entry:\e[0m |
54806111 IB |
19 | ldapmodify -D "cn=root,<%= @ldap_base %>" -W << 'EOF' |
20 | dn: <%= @ldap_dn %> | |
21 | changetype: modify | |
22 | replace: userPassword | |
23 | userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %> | |
c15f2234 | 24 | - |
85abd2fd IB |
25 | replace: environment |
26 | environment: <%= @environment %> | |
51ab750f IB |
27 | <%- unless @ips.empty? -%> |
28 | - | |
29 | delete: ipHostNumber | |
30 | <%- unless @ips["v4"].nil? -%> | |
31 | - | |
32 | add: ipHostNumber | |
33 | ipHostNumber: <%= @ips["v4"]["ipAddress"] %> | |
34 | <%- end -%> | |
35 | <%- unless @ips["v6"].nil? -%> | |
36 | - | |
37 | add: ipHostNumber | |
38 | ipHostNumber: <%= @ips["v6"]["ipAddress"] %>/<%= @ips["v6"]["mask"] %> | |
39 | <%- end -%> | |
40 | <%- end -%> | |
54806111 | 41 | EOF |