]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/base_installation/templates/puppet/host_ldap_mod_top.info.erb
Change host_ldap to concat
[perso/Immae/Projets/Puppet.git] / modules / base_installation / templates / puppet / host_ldap_mod_top.info.erb
diff --git a/modules/base_installation/templates/puppet/host_ldap_mod_top.info.erb b/modules/base_installation/templates/puppet/host_ldap_mod_top.info.erb
new file mode 100644 (file)
index 0000000..d7a1294
--- /dev/null
@@ -0,0 +1,23 @@
+\e[0;35m#### Or modify an existing entry:\e[0m
+ldapmodify -D "cn=root,<%= @ldap_base %>" -W << 'EOF'
+dn: <%= @ldap_dn %>
+changetype: modify
+replace: userPassword
+userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %>
+-
+replace: environment
+environment: <%= @environment %>
+<%- unless @ips.empty? -%>
+-
+delete: ipHostNumber
+<%- unless @ips["v4"].nil? -%>
+-
+add: ipHostNumber
+ipHostNumber: <%= @ips["v4"]["ipAddress"] %>
+<%- end -%>
+<%- unless @ips["v6"].nil? -%>
+-
+add: ipHostNumber
+ipHostNumber: <%= @ips["v6"]["ipAddress"] %>/<%= @ips["v6"]["mask"] %>
+<%- end -%>
+<%- end -%>