Ask Your Question
0

How do I express an empty array in Hiera?

asked 2016-09-19 19:28:51 -0500

jflorian gravatar image

I need to override the default value of class parameter for a module which expects an array. I can do this easily enough with traditional Puppet code:

class { 'foo':
  bar => []
}

However, I would like to have all the parameters in Hiera using the automatic class parameter lookup. Can this even be done? BTW, I'm using YAML format.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-09-19 19:35:20 -0500

lupin gravatar image

something like this class::parameter: []

edit flag offensive delete link more
0

answered 2016-09-19 19:33:53 -0500

jflorian gravatar image

Meh! Stupid formats that try to avoid the syntax of a language, only to circle back and use it anyway. I should have done my web search with "empty yaml array" instead of "empty hiera array". Turns out this is as easy as:

foo::bar: [ ]

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-09-19 19:28:51 -0500

Seen: 570 times

Last updated: Sep 19 '16