Hi,
On 20/08/08 15:41, Jeff wrote:
> Is there a way to append values to an array? Consider this:
>
> $sudoers = $identity ? {
> 'oracle' => ['namath', 'obrien', 'testeverde', 'favre'],
> 'webdev' => ['ruth', 'jeter'],
> default => ['simms', 'taylor'],
> }
>
> Now I'd like to maybe add the security team:
>
> if $security {
> $sudoers += ['bob', 'doug'] # or something like this...
> }
>
0.24.6 will contain one of my puppet contribution that implements
exactly this. Except that it respects the write-once paradigm of
variables, so the += operator can only be used in a new scope and it
doesn't change the value of the original variable.
Hope that will help the users :-)
--
Brice Figureau
Days of Wonder
http://www.daysofwonder.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---