Open adfel70 opened 7 years ago
this is because of the split of library paths for server and agent. more details can be found here: https://tickets.puppetlabs.com/browse/SERVER-571
for use with the hiera CLI you also need to set the RUBYLIB environment variable like:
RUBYLIB="/opt/puppetlabs/puppet/cache/lib" hiera
What module are you using to setup your puppetmaster? If using theforeman you'll want to set the following: puppet::server_ruby_load_paths:
This adds the line to the /etc/puppetlabs/puppetserver/conf/puppetserver.conf line otherwise you can manually add the line.
We used to work a lot with the puppetdb backend from Hiera on Puppet 3 and Hiera 1.3.4. No we are installing a new environment based on Puppet 4 (puppet 4.8, puppetserver 2.7.2, Puppetdb 4.3.0)
We installed version 2.2.0 of puppetdbquery module. the CLI is working, but when adding puppetdb backend into hiera.yaml file we are getting the following error on agents:
We tried to manually copy puppetdb_backend.rb to /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/hiea/backend but then we got the next error:
Surely we are missing something, so we stopped there... Could you please help us understand what we are doing wrong? Thanks!