Re: [Puppet Users] Re: Puppet 3.2: add element to array

2013-10-24 Thread Erik Dalén
It is possible in a lot of puppet versions but it is a bug and might get fixed. $a = [1,2] $a[2]=3 notice($a) On 22 October 2013 15:20, jcbollinger john.bollin...@stjude.org wrote: On Monday, October 21, 2013 1:21:18 PM UTC-5, Sergey Arlashin wrote: Hi! Is it possible to add a new

Re: [Puppet Users] Re: Puppet 3.2: add element to array

2013-10-24 Thread Henrik Lindberg
On 2013-24-10 11:19, Erik Dalén wrote: It is possible in a lot of puppet versions but it is a bug and might get fixed. $a = [1,2] $a[2]=3 notice($a) It is a bug that is planned to be fixed in Puppet 4. (It cannot be changed in the 3.x series as it would potentially be a breaking change).

[Puppet Users] Re: Puppet 3.2: add element to array

2013-10-22 Thread jcbollinger
On Monday, October 21, 2013 1:21:18 PM UTC-5, Sergey Arlashin wrote: Hi! Is it possible to add a new element to an array inside puppet manifest ? Something like ruby's array.push('new_element') ? No, it isn't. It is a fundamental principle of Puppet that variables' values cannot be

[Puppet Users] Re: Puppet 3.2: add element to array

2013-10-21 Thread Daniele Sluijters
HI, It should be possible to do something like this: $users = [a,b,c] $users += [d,e] Or, $users = [[a,b,c] [d,e]] etc. Perhaps a better question, what is it you're trying to do, exactly, that you need this? -- Daniele Sluijters On Monday, 21 October 2013 20:21:18 UTC+2, Sergey Arlashin