Ask Your Question
0

lookup hiera value in a module facter / Custom Type

asked 2013-11-16 06:27:55 -0500

Edwin gravatar image

Hi,

I want to use hiera for some facter variables and also want to use hiera for the custom type parameters. Is this possible or is there an other way, like a parameter class.

In the facter rb file located in my lib/facter directory of the module. In this rb file I have a global variable with a fixed value, I want to retrieve this from hiera or some other way , so the user don't need to change this in the facter code

I have also some flexible defines with some parameters which have some hiera default values ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-11-18 07:21:23 -0500

Hi,

facts are running on the node. Whereas hiera is located on the master. You can check for a configuration file within your custom fact which can be used to modify the output of your custom fact.

Within your custom type you can define attributes (newparam, newproperty). When using you custom type you can use data from hiera to set your attributes.

hth,

Martin

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: 2013-11-16 06:27:55 -0500

Seen: 757 times

Last updated: Nov 18 '13