Ask Your Question
0

How to add items to array in manifest

asked 2014-01-27 07:14:48 -0500

jaksky gravatar image

Hi,

I would like dynamically build an array in puppet 2.7. Because of variable are immutable I am bit strugling with that. Can someone give me a hint how to achieve that?

I was trying something like that:

$arr =[]
$arr[size($arr)]='Item'

I found operator += but that doesn't seem to work in puppet 2.7

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-01-27 11:25:26 -0500

doc75 gravatar image

Did you read this article suggesting to use += with higher scope variable: http://weblog.etherized.com/posts/175 ? I am not sure this is waht you need as you might want to add several value in the same scope.

Hope this helps.

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: 2014-01-27 07:14:48 -0500

Seen: 8,799 times

Last updated: Jan 27 '14