Ask Your Question
0

Puppet master compile, Hiera error

asked 2016-05-06 13:42:07 -0500

mike.r gravatar image

trying to troubleshoot this error not sure where to look, one of my nodes a Debian box has correct certs, Im having issues running agent -t. Using Hiera for classifier, I double checked the yaml file for this node, can pull values from it using hiera command line,

hiera classes ::hostname=node1 ["nginx","ntp"]

when running

puppet master --debug --compile node1

its getting the facts and running thru catalog compile, but getting this error towards end,

Debug: hiera(): Hiera YAML backend starting
Debug: hiera(): Looking up classes in YAML backend
Debug: hiera(): Looking for data source node/node1
Debug: hiera(): Found classes in node/node1
Debug: hiera(): Looking for data source Debian
Error: Evaluation Error: Error while evaluating a Function Call, (<unknown>): could not find expected ':' while scanning a simple key at line 3 column 1 at /etc/puppetlabs/code/environments/production/manifests/site.pp:38:1 on node node1
Error: Evaluation Error: Error while evaluating a Function Call, (<unknown>): could not find expected ':' while scanning a simple key at line 3 column 1 at /etc/puppetlabs/code/environments/production/manifests/site.pp:38:1 on node node1
Error: Failed to compile catalog for node node1: Evaluation Error: Error while evaluating a Function Call, (<unknown>): could not find expected ':' while scanning a simple key at line 3 column 1 at /etc/puppetlabs/code/environments/production/manifests/site.pp:38:1 on node node1

I copied a working YAML file from another node to this node, the other node runs fine on compile, but something about this one causes the error. Also tried cleaning the cert and re-adding, but same error on compile debug run.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-05-06 13:47:12 -0500

mike.r gravatar image

updated 2016-05-06 13:47:54 -0500

Nevermind, found the error,

my OS Family yaml for Debian was messed up, so the host Yaml was ok but OS had syntax errors, my hiera.yaml had the following tree,

 ---
  2 :backends:
  3   - yaml
  4 :hierarchy:
  5   - "node/%{::hostname}"
  6   - "%{::osfamily}"
  7   - common

Line #6 was failing. I wish Hiera had better error output to zero in on which Yaml file its failing. This was a relatively simple case, if I had a more complex hierarchy, debugging this would be a nightmare.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-05-06 13:42:07 -0500

Seen: 542 times

Last updated: May 06 '16