hiera-ldap
hiera-ldap copied to clipboard
Puppet4 / Hiera5 compatibility?
We are trying to use this module under Puppet OpenSource 4.10 but no luck so far.
We configured an Hiera3 backend at the global level of our Hiera5 hierarchy (as explained in the docs):
# cat /etc/puppetlabs/puppet/hiera.yaml
---
version: 5
hierarchy:
- name: "Data from LDAP"
hiera3_backend: ldap
options:
base: 'something'
host: 'yup'
port: 636
auth:
method: 'simple'
username: 'foo'
password: 'bar'
Then had problems installing the net/ldap gem (because it requires Ruby >= 2.0.0 and Puppetserver is using JRuby 1.7.x), the best we could come up was to install a much older version:
# puppetserver --version
puppetserver version: 2.7.2
# puppetserver gem install net-ldap --no-ri --no-rdoc -v 0.5.1
Successfully installed net-ldap-0.5.1
1 gem installed
# puppetserver gem list | grep ldap
net-ldap (0.5.1)
But the backend always fails and I don't know if it's because of the old gem version or if there is another problem somewhere else:
# puppet lookup --explain "cn=$(hostname)"
Searching for "cn=foo.bar.baz"
Global Data Provider (hiera configuration version 5)
Using configuration "/etc/puppetlabs/puppet/hiera.yaml"
Hierarchy entry "Data from LDAP"
Unable to load backend 'ldap': cannot load such file -- net/ldap
Is there any hope that this excellent backend could be ported to work under Puppet4 / Hiera5 and its Puppetserver?