Ask Your Question

how to create array of arrays from hiera in puppet

asked 2015-11-12 15:53:24 -0500

Arijit gravatar image

I have a situation where I have to generate array of arrays which are declared in hiera in puppet at different hierarchies.

Lets say at environment level I have a declaration

test: - [a,b,c,d] - [e,f,g,h] and at common.yaml I have a declaration

test: - [i,j,k,l] - [m,n,o,p] Now, when I pass the hiera_array value I want the output as

[[i,j,k,l],[m,n,o,p],[a,b,c,d],[e,f,g,h]] currently the output is [i,j,k,l......e,f,g,h] basically in one merged array value.

I want it in array of array format so that I can pas that to a template and apply it to required logic. Please tell me if there is any way to achieve this.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-16 08:18:58 -0500

Cristian Falcas gravatar image

Just to let others know the answer: how to create array of arrays from hiera in puppet

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


Asked: 2015-11-12 15:53:24 -0500

Seen: 367 times

Last updated: Nov 16 '15