several hiera data files and resource type with many parameters

asked 2017-03-21 12:15:53 -0500

rssh22 gravatar image

Lets say that I have a resource type with have many parameters (many could means hundred or even more). Having one resource_config.yaml file for all the resource instances of this resource type is not wished because the file would be huge and very diffcult to maintain. I'd like to have one yaml config file for each instance.

However, I don't really know how to achieve this.

I've thought of different strategies without success.

Any help would be appreciated.

edit retag flag offensive close merge delete

Comments

1

I am not sure what a "resource instance" is. Also maybe you could sanitize (remove paswords and such) from your yaml file and post an example.

Red Cricket gravatar imageRed Cricket ( 2017-03-21 13:30:05 -0500 )edit

I'm also confused about what you are asking for. Are you asking to have a separate .yaml file for each 'instance', aka node in your configuration? Do you have some auto-generated collection of parameters and you want to maintain that huge list in a separate file?

DarylW gravatar imageDarylW ( 2017-03-22 07:23:18 -0500 )edit

Also, you don't usually make a single file to configure each resource, you also would probably want a 'defaults' option to hold the default value for most of the parameters in your case, and only keep specific values where they deviate

DarylW gravatar imageDarylW ( 2017-03-22 07:24:31 -0500 )edit