Ask Your Question

Variable is undefined but interpolates to a value

asked 2015-04-22 21:41:14 -0600

Supermathie gravatar image

Whlie tracing a problem ( ) I observed the following root cause:


on the master produces the output:

Apr 23 01:15:32 puppetmaster puppet-master[10104]: (Scope(Class[main])) Ubuntu
Apr 23 01:15:32 puppetmaster puppet-master[10104]: (Scope(Class[main])) false

How is that even possible? What could be going on here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-23 00:04:18 -0600

GregLarkin gravatar image

There is a bug in the defined function that prevents it from handling top-scope variables correctly. You can either omit the "::" operator, assuming there is no local-scope variable with the same name already, or you can assign the top-scope variable to a local-scope variable and pass it to the defined() function instead.

Also see, and it appears this will be fixed (or has been by now, since it was just released) in Puppet 4.0.

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: 2015-04-22 21:41:14 -0600

Seen: 189 times

Last updated: Apr 23 '15