DevOps Monkey Goodness

Puppet Error No Implicit Conversion of String into Hash

Puppet Error

This one had me scratching my head for a while (Puppet opensource 3.7.1)

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: no implicit conversion of String into Hash at /etc/puppet/modules/appfabric/manifests/appfabricinstaller.pp:3 on node myserver.somewhere

Warning: Not using cache on failed catalog

Error: Could not retrieve catalog; skipping run

 

The Fix

I noticed in Puppet 3.7.1 the hiera.yaml file was not formatted correctly which wasn’t a problem in previous versions.

For example this won’t work:


:hierarchy:
– “Servers/%{environment}/%{hostname}”
– “%{environment}”
– “%{location}”
– “%{flavour}”
– “common”
:backends:
– eyaml
:eyaml:
:datadir: /etc/puppet/hieradata

Adding spaces fixed the problem:
 

:hierarchy:
  – “Servers/%{environment}/%{hostname}”
  – “%{environment}”
  – “%{location}”
  – “%{flavour}”
  – “common”
:backends:
  – eyaml
:eyaml:
  :datadir: /etc/puppet/hieradata

No Comments Yet

Leave a Reply