hiera eyaml erroring out in puppet agent run [closed]

asked 2016-12-13 15:05:39 -0500

updated 2016-12-13 15:06:44 -0500

This is the error that i am getting when i do a sudo puppet agent -t on the agent node:

Error while evaluating a Function Call, Lookup of key 'epel::epel_mirrorlist' failed: DataBinding 'hiera': Cannot load backend eyaml: no such file to load -- hiera/backend/eyaml_backend


# managed by puppet
- eyaml
- consul
- yaml

:logger: console

  - secure
  - common

  :datadir: /etc/puppetlabs/code/environments/%{::environment}/hieradata
  :pkcs7_private_key: /etc/puppetlabs/puppet/keys/private_key.pkcs7.pem
  :pkcs7_public_key: /etc/puppetlabs/puppet/keys/public_key.pkcs7.pem

  :port: '8500'
  - /v1/catalog/service
  - /v1/catalog/node
  :datadir: /etc/puppetlabs/code/environments/%{::environment}/hieradata

I have a secure.eyaml in /etc/puppetlabs/code/environments/%{::environment}/hieradata.

Please let me know if i should have hiera eyaml gem installed in puppet agent too? How to fix this error in the node side.

I have restarted the puppet server after the above mentioned hiera.yaml was generated.

I tried linking the folders as follows in the master

  sudo ln /opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/hiera-eyaml-2.1.0/lib/hiera/backend/eyaml.rb /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/hiera/backend/eyaml.rb

I am all out of options.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Redsmile
close date 2017-01-31 15:55:42.473269


did you install the eyaml gems using the `puppetserver gem` command? `puppetserver gem install hiera-eyaml`. If you installed it with system ruby instead of the puppetserver's AIO/JRuby, then that could be part of your problem. Try 'puppetserver gem list | grep eyaml'

DarylW gravatar imageDarylW ( 2016-12-13 15:42:29 -0500 )edit

The thing is I did not install the eyaml gems myself. In puppet/hiera module,it installed hiera eyaml gem.If i declared package{ 'hiera-eyaml':provider =>'puppet_gem'} in my manifest it gave me duplicate resource error.Please provide code for doing puppetserver gem install hiera-eyaml thru puppet.

Redsmile gravatar imageRedsmile ( 2016-12-13 16:01:59 -0500 )edit

I need to be able to do puppetserver gem install hiera-eyaml through puppet manifest. If i do it in the command line as per your advice, it works fine. I want to be able to do that via puppet manifest. Please provide example. Thanks!

Redsmile gravatar imageRedsmile ( 2016-12-13 16:02:47 -0500 )edit

Are you using a specific 'puppet' or 'hiera' module to install everything, or did you roll your own? If you are using a module from the forge, can you link to it?

DarylW gravatar imageDarylW ( 2016-12-14 07:38:43 -0500 )edit