diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-08-14 22:49:29 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-08-17 12:50:25 +0200 |
commit | 7dc85dc776e158e26202362f11a72d7491ef07c8 (patch) | |
tree | a3e1c6d358efe68d8f00604ae10377735aca76cb /modules/base_installation/templates/puppet/host_ldap_mod_top.info.erb | |
parent | 7f8c632757246813c0a9fdbf0c26ef036ff396be (diff) | |
download | Puppet-7dc85dc776e158e26202362f11a72d7491ef07c8.tar.gz Puppet-7dc85dc776e158e26202362f11a72d7491ef07c8.tar.zst Puppet-7dc85dc776e158e26202362f11a72d7491ef07c8.zip |
Change host_ldap to concat
Diffstat (limited to 'modules/base_installation/templates/puppet/host_ldap_mod_top.info.erb')
-rw-r--r-- | modules/base_installation/templates/puppet/host_ldap_mod_top.info.erb | 23 |
1 files changed, 23 insertions, 0 deletions
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 index 0000000..d7a1294 --- /dev/null +++ b/modules/base_installation/templates/puppet/host_ldap_mod_top.info.erb | |||
@@ -0,0 +1,23 @@ | |||
1 | [0;35m#### Or modify an existing entry:[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 -%> | ||