aboutsummaryrefslogtreecommitdiff
path: root/modules/base_installation/templates
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2017-08-30 22:16:39 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2017-08-31 22:59:53 +0200
commit548061112d2e2627317f9379d2f501fcf3f6ea54 (patch)
tree19fb949ad1fb965b4705897650809b4ffb6e9f29 /modules/base_installation/templates
parent1508e956adaa97b7a82c27537f4b124266dacdf0 (diff)
downloadPuppet-548061112d2e2627317f9379d2f501fcf3f6ea54.tar.gz
Puppet-548061112d2e2627317f9379d2f501fcf3f6ea54.tar.zst
Puppet-548061112d2e2627317f9379d2f501fcf3f6ea54.zip
Add LDAP support
Diffstat (limited to 'modules/base_installation/templates')
-rw-r--r--modules/base_installation/templates/ldap/ldap.conf.erb3
-rw-r--r--modules/base_installation/templates/puppet/host_ldap.info.erb17
-rw-r--r--modules/base_installation/templates/puppet/puppet.conf.erb12
3 files changed, 32 insertions, 0 deletions
diff --git a/modules/base_installation/templates/ldap/ldap.conf.erb b/modules/base_installation/templates/ldap/ldap.conf.erb
new file mode 100644
index 0000000..626a986
--- /dev/null
+++ b/modules/base_installation/templates/ldap/ldap.conf.erb
@@ -0,0 +1,3 @@
1uri <%= @ldap_uri %>
2base <%= @ldap_base %>
3tls_cacert <%= @ldap_cert_path %>
diff --git a/modules/base_installation/templates/puppet/host_ldap.info.erb b/modules/base_installation/templates/puppet/host_ldap.info.erb
new file mode 100644
index 0000000..a350c37
--- /dev/null
+++ b/modules/base_installation/templates/puppet/host_ldap.info.erb
@@ -0,0 +1,17 @@
1#### Please add this node to LDAP:
2ldapadd -D "cn=root,<%= @ldap_base %>" -W << 'EOF'
3dn: <%= @ldap_dn %>
4cn: <%= @ldap_cn %>
5objectclass: device
6objectclass: top
7objectclass: simpleSecurityObject
8objectclass: puppetClient
9userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %>
10EOF
11#### Or modify an existing entry:
12ldapmodify -D "cn=root,<%= @ldap_base %>" -W << 'EOF'
13dn: <%= @ldap_dn %>
14changetype: modify
15replace: userPassword
16userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %>
17EOF
diff --git a/modules/base_installation/templates/puppet/puppet.conf.erb b/modules/base_installation/templates/puppet/puppet.conf.erb
new file mode 100644
index 0000000..99d9fc3
--- /dev/null
+++ b/modules/base_installation/templates/puppet/puppet.conf.erb
@@ -0,0 +1,12 @@
1[main]
2ssldir = <%= @puppet_ssl_path %>
3
4node_terminus = ldap
5ldapserver = <%= @ldap_server %>
6ldaptls = true
7ldapbase = <%= @ldap_base %>
8ldapuser = <%= @ldap_dn %>
9ldappassword = <%= @ldap_password %>
10ldapclassattrs = puppetClass
11ldapparentattr = parentNode
12ldapstackedattrs = puppetVar