Ask Your Question

How to override this using hiera

asked 2018-12-30 23:21:52 -0600

jongm0816 gravatar image

updated 2019-01-07 08:39:19 -0600

DarylW gravatar image

I have this in the manifest

Boolean $testvar = true

if $testvar {
    blah blah

My goal is, I do not want to go inside the if statement when the manifest runs in HostA, so I created this node hiera;

modulename::manifestname::testvar: false

I also tried setting it to undef in the node hiera file. Manual lookups from the puppet master show whatever I set in the node hiera.

But I always get inside the if statement, meaning blah blah gets executed everytime.

What is wrong here? Advise much appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-01-05 04:13:00 -0600

nscholtke gravatar image


puppet only automaticly looks up variables in the parameter Definition of your class. If you do not want it as a parameter then you can use the hiera lookup functions.

You can check it Here Functions

One of these two should do the job

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-12-30 23:21:52 -0600

Seen: 340 times

Last updated: Jan 07