]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blob - modules/base_installation/templates/puppet/host_ldap_mod_top.info.erb
Merge branch 'file_store' into dev
[perso/Immae/Projets/Puppet.git] / modules / base_installation / templates / puppet / host_ldap_mod_top.info.erb
1 \e[0;35m#### Or modify an existing entry:\e[0m
2 ldapmodify -D "cn=root,<%= @ldap_base %>" -W << 'EOF'
3 dn: <%= @ldap_dn %>
4 changetype: modify
5 replace: userPassword
6 userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %>
7 -
8 replace: environment
9 environment: <%= @environment %>
10 <%- unless @ips.empty? -%>
11 -
12 delete: ipHostNumber
13 <%- unless @ips["v4"].nil? -%>
14 -
15 add: ipHostNumber
16 ipHostNumber: <%= @ips["v4"]["ipAddress"] %>
17 <%- end -%>
18 <%- unless @ips["v6"].nil? -%>
19 -
20 add: ipHostNumber
21 ipHostNumber: <%= @ips["v6"]["ipAddress"] %>/<%= @ips["v6"]["mask"] %>
22 <%- end -%>
23 <%- end -%>