aboutsummaryrefslogtreecommitdiff
path: root/modules/base_installation/templates/puppet/host_ldap.info.erb
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2017-09-18 00:16:05 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2017-09-18 00:22:19 +0200
commit51ab750fa5b84edd34d50d898f12aa1d2032950c (patch)
tree3eb03764229a0a7925d409df15f08ad6a71d1bbb /modules/base_installation/templates/puppet/host_ldap.info.erb
parenteac05dd434b4bbb068d41620d574d86165ad6e20 (diff)
downloadPuppet-51ab750fa5b84edd34d50d898f12aa1d2032950c.tar.gz
Puppet-51ab750fa5b84edd34d50d898f12aa1d2032950c.tar.zst
Puppet-51ab750fa5b84edd34d50d898f12aa1d2032950c.zip
Add ips to LDAP
Diffstat (limited to 'modules/base_installation/templates/puppet/host_ldap.info.erb')
-rw-r--r--modules/base_installation/templates/puppet/host_ldap.info.erb19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/base_installation/templates/puppet/host_ldap.info.erb b/modules/base_installation/templates/puppet/host_ldap.info.erb
index f742da7..525739b 100644
--- a/modules/base_installation/templates/puppet/host_ldap.info.erb
+++ b/modules/base_installation/templates/puppet/host_ldap.info.erb
@@ -7,6 +7,11 @@ objectclass: device
7objectclass: top 7objectclass: top
8objectclass: simpleSecurityObject 8objectclass: simpleSecurityObject
9objectclass: puppetClient 9objectclass: puppetClient
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 -%>
10userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %> 15userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %>
11EOF 16EOF
12#### Or modify an existing entry: 17#### Or modify an existing entry:
@@ -15,4 +20,18 @@ dn: <%= @ldap_dn %>
15changetype: modify 20changetype: modify
16replace: userPassword 21replace: userPassword
17userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %> 22userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %>
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 -%>
18EOF 37EOF