Is there a way to use array of values in looking up classes via Hiera ?
I have implemented a few custom Facts to describe the hierarchy of role(s) of a server (E.g. Level 1 - Env Type : UAT,PROD,etc., Level 2 - Application Type, Level 3 - Application Component...etc) . The facts are stored in a text config file sitting on the target server. I have been trying to use Hiera to lookup the right puppet classes to be used for my servers based on the custom facts defined. One problem I have encountered is that for each custom fact, I can just have one single value. For example, at the Application Component fact, I cannot tell Hiera that this server is supposed to run Component A, B, C altogether, since Hiera yaml files does not seem to support an array of values. I can possibly use array, array.. etc in my hiera yaml files to get around the problem, but that means I have to pre-define a maximum number of different application components for each server. Is there any better way to implement Hiera to address my problem ?
Thanks a lot.