Ask Your Question

[Puppet 5.5/Module] how to use hiera in a ruby function ?

asked 2018-07-01 19:17:01 -0600

l0k169 gravatar image

I want simply use an hiera value in a ruby function,I can do it with a fact, but not an hiera

My hiera value ucmdb::listener: "%{hiera('ucmdb::server')}:%{hiera('ucmdb::defaultport')}"*

edit retag flag offensive close merge delete


If it’s a function, pass it as an argument?

DarylW gravatar imageDarylW ( 2018-07-03 07:33:55 -0600 )edit

yes it's a possibility , but I want do it with a ruby call for different raisons (dynamic var, ...)

l0k169 gravatar imagel0k169 ( 2018-07-03 14:52:55 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-07-03 14:53:59 -0600

l0k169 gravatar image

I find a possibility with : listener=closure_scope.call_function('hiera', ['ucmdb::listener'] )

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


Asked: 2018-07-01 19:17:01 -0600

Seen: 33 times

Last updated: Jul 03