running 0.24.7
According to the language tutorial I should be able to do:
$ssh_users = [ 'myself', 'someone' ]
class test {
$ssh_users += ['someone_else']
}
I'm trying to append to an array within a class, so i'm doing:
class test {
$metrics = ['a','b']
$metrics += [''c]
}
With the above I get the following:
err: Could not retrieve catalog: Cannot append, variable metrics is
defined in this scope at
/etc/puppet/production/modules/mymodule/manifests/metrics.pp:132 on
node host.internal
Can I only append to the variable once inside a class? I'm not
worried about the order they get appended.
I'm doing this so I can wrap some logic around appending variables to the array.
Thanks,
Matt
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---