]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blame - modules/base_installation/templates/puppet/host_ldap.info.erb
Upgrade bot
[perso/Immae/Projets/Puppet.git] / modules / base_installation / templates / puppet / host_ldap.info.erb
CommitLineData
54806111
IB
1#### Please add this node to LDAP:
2ldapadd -D "cn=root,<%= @ldap_base %>" -W << 'EOF'
3dn: <%= @ldap_dn %>
4cn: <%= @ldap_cn %>
503e4cf5 5cn: <%= @system_hostname %>
54806111
IB
6objectclass: device
7objectclass: top
8objectclass: simpleSecurityObject
9objectclass: puppetClient
51ab750f
IB
10<%- unless @ips.empty? -%>
11objectclass: ipHost
12<% unless @ips["v4"].nil? -%>ipHostNumber: <%= @ips["v4"]["ipAddress"] %><%- end %>
13<% unless @ips["v6"].nil? -%>ipHostNumber: <%= @ips["v6"]["ipAddress"] %>/<%= @ips["v6"]["mask"] %><%- end %>
14<%- end -%>
54806111
IB
15userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %>
16EOF
17#### Or modify an existing entry:
18ldapmodify -D "cn=root,<%= @ldap_base %>" -W << 'EOF'
19dn: <%= @ldap_dn %>
20changetype: modify
21replace: userPassword
22userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %>
51ab750f
IB
23<%- unless @ips.empty? -%>
24-
25delete: ipHostNumber
26<%- unless @ips["v4"].nil? -%>
27-
28add: ipHostNumber
29ipHostNumber: <%= @ips["v4"]["ipAddress"] %>
30<%- end -%>
31<%- unless @ips["v6"].nil? -%>
32-
33add: ipHostNumber
34ipHostNumber: <%= @ips["v6"]["ipAddress"] %>/<%= @ips["v6"]["mask"] %>
35<%- end -%>
36<%- end -%>
54806111 37EOF