From 7dc85dc776e158e26202362f11a72d7491ef07c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 14 Aug 2018 22:49:29 +0200 Subject: Change host_ldap to concat --- .../templates/puppet/host_ldap_add_top.info.erb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 modules/base_installation/templates/puppet/host_ldap_add_top.info.erb (limited to 'modules/base_installation/templates/puppet/host_ldap_add_top.info.erb') diff --git a/modules/base_installation/templates/puppet/host_ldap_add_top.info.erb b/modules/base_installation/templates/puppet/host_ldap_add_top.info.erb new file mode 100644 index 0000000..3aafc19 --- /dev/null +++ b/modules/base_installation/templates/puppet/host_ldap_add_top.info.erb @@ -0,0 +1,16 @@ +#### Please add this node to LDAP: +ldapadd -D "cn=root,<%= @ldap_base %>" -W << 'EOF' +dn: <%= @ldap_dn %> +cn: <%= @ldap_cn %> +objectclass: device +objectclass: top +objectclass: simpleSecurityObject +objectclass: puppetClient +<%- unless @ips.empty? -%> +objectclass: ipHost +<% unless @ips["v4"].nil? -%>ipHostNumber: <%= @ips["v4"]["ipAddress"] %><%- end %> +<% unless @ips["v6"].nil? -%>ipHostNumber: <%= @ips["v6"]["ipAddress"] %>/<%= @ips["v6"]["mask"] %><%- end %> +<%- end -%> +environment: <%= @environment %> +puppetVar: real_hostname=<%= @real_hostname %> +userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %> -- cgit v1.2.3