Hiera configuration file had wrong type

asked 2017-06-22 09:18:46 -0500

CBR gravatar image

Hi,

I'm getting this error when doing puppet apply (I'm running masterless puppet). I was using Hiera 4 configuration in hiera.yaml but I couldnt find configuration for eyaml for that version. I switched configuration file version to hiera 3 but I see these errors now. Without upgrading my puppet agent, is there a way to fix my issue ?

Error:  The Hiera Configuration at '/etc/puppetlabs/code/environments/production/modules/mymodule/hiera.yaml' had wrong type, entry 'hierarchy' index 0 expected a Struct value, got String
  The Hiera Configuration at '/etc/puppetlabs/code/environments/production/modules/mymodule/hiera.yaml' had wrong type, entry 'hierarchy' index 1 expected a Struct value, got String
  The Hiera Configuration at '/etc/puppetlabs/code/environments/production/modules/mymodule/hiera.yaml' had wrong type, entry 'hierarchy' index 2 expected a Struct value, got String
  The Hiera Configuration at '/etc/puppetlabs/code/environments/production/modules/mymodule/hiera.yaml' had wrong type, expected a value for key 'version'
  The Hiera Configuration at '/etc/puppetlabs/code/environments/production/modules/mymodule/hiera.yaml' had wrong type, unrecognized key 'backends'
  The Hiera Configuration at '/etc/puppetlabs/code/environments/production/modules/mymodule/hiera.yaml' had wrong type, unrecognized key 'eyaml'
  The Hiera Configuration at '/etc/puppetlabs/code/environments/production/modules/mymodule/hiera.yaml' had wrong type, unrecognized key 'yaml'

Here is my VM with packages installed

Agent version: 4.5.3
Hiera: 3.2.0
Puppet gems installed
 *** LOCAL GEMS ***

bigdecimal (1.2.4)
deep_merge (1.0.1)
facter (3.3.0)
hiera (3.2.0)
hiera-eyaml (2.1.0)
highline (1.6.21)
hocon (0.9.3)
io-console (0.4.3)
json (1.8.1)
minitest (4.7.5)
net-ssh (2.9.2)
psych (2.0.5)
puppet (4.5.3)
rake (10.1.0)
rdoc (4.1.0)
semantic_puppet (0.1.2)
stomp (1.3.3)
test-unit (2.1.9.0)
trollop (2.1.2)
edit retag flag offensive close merge delete

Comments

Probably hiera.yaml syntax errors in the modules' hiera.yaml files. I suppose you intend there to be hiera.yaml files there (i.e. "data in modules") and that they are not just stray hiera.yaml files (if they are not be used to you need to move them). Need to see content of hiera.yaml to say more.

Henrik Lindberg gravatar imageHenrik Lindberg ( 2017-06-26 06:31:27 -0500 )edit