Ask Your Question

Puppet lookup --node <node> $ and <node># puppet agent -t --noop differ

asked 2018-08-30 08:36:00 -0600

Jan Huijsmans gravatar image

updated 2018-09-01 04:26:23 -0600

While rewriting a module to move config from hard-coded files to hieradata (and use the data in a template) I managed to get me behaviour I can't explain.


  • Puppet 4.10.9 server and clients
  • Introduction of completely new variable for hash
  • Variable needed defined in common.yaml
  • For some systems hash gets additional config
  • lookup merge-type deep
  • 1000+ nodes in config
  • all but 2 get var as specified in common.yaml (or extended)
  • 2 don't get the var at all

Situation 1:

  • module with Hash $var and no default.
  • puppet lookup --node $node $var on server results in error
  • on node puppet agent -t --noop gives error as well.

I get the same result on both occasions, but only for the 2 problem nodes, all others work.

Situation 2:

  • module gets empty hash as default
  • puppet lookup --node $node $var on server results in expected output (content of $var as specified in common.yaml )
  • on node puppet agent -t --noop gives empty file that should be filled in data from $var.

What puzzles me is:

  • Why do I get different results on 2 nodes compared to all others
  • Why don't I get a variable that it in common.yaml in a puppet run while a puppet lookup for the 2 specific nodes shows the variable when I set a default.
  • Why does a puppet lookup fail on 2 nodes when no default is set, but works for all other nodes?

What can cause this behaviour?

Expected behaviour:

  • Consistent results over all nodes and compared between puppet lookup for the node and a puppet run on the node.
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-09-04 08:55:56 -0600

Jan Huijsmans gravatar image

Never mind, way to subtle typo in the variable name in 1 file... common,yaml.

Even colleagues missed it. (took us a couple of days :( )

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


Asked: 2018-08-30 08:36:00 -0600

Seen: 123 times

Last updated: Sep 04