Issue #5613 has been updated by Daniel Pittman.
Nigel Kersten wrote: > Daniel, I saw you comment on the original thread that you had a similar need. > Can you elaborate on that? I had problems along the lines of "enumerate all nodes for the backup system", or "list all application servers for web app X on the load balancer". We generally solved those with either concat, custom code building out the file on the target machine, or collecting files on the master and using `generate` to combine them into a single variable in Puppet. ---------------------------------------- Feature #5613: Appending to Variables in a global context https://projects.puppetlabs.com/issues/5613 Author: Spenser Gilliland Status: Needs More Information Priority: Normal Assignee: Daniel Pittman Category: language Target version: Affected Puppet version: Keywords: exported variables, globals Branch: I'd like a syntax style for returning an array in a global context. IE: class redmine { instances = [] } define redmine::instance { instances += "name" } Or another possible syntax style. class redmine { instances = array_element <<| tag = "$fqdn" |>> } define redmine { array_element{"$name": tag => "$fqdn"} } These would ideally both create an array of the defined instances names. I describe the use case in this email thread in greater detail. https://groups.google.com/group/puppet-users/browse_thread/thread/9c4299eba91c9d15/9f80f5d4aa766321?hl=en#9f80f5d4aa766321 -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en.
