On Tuesday, November 13, 2012 8:47:00 AM UTC-6, Gavin Williams wrote: > > Afternoon all > > Is it possible to pass an array of key=value pairs to a provider param, > and have the provider split and handle each key=value pair? > > Basically, I've defined a new provider and type as follows: > http://pastebin.com/WdekYPAh >
I can't see your code because pastebin is blocked to me, but I may be able to give you some advice anyway: 1. You can pass an array of key=value pairs as a parameter to a provider, and the provider can parse it any way you like. 2. BUT you should not try to populate *other* parameters' values that way. If you define a parameter that accepts a complex, structured value, then the entire value belongs to the parameter to which it is assigned. 3. Wouldn't a hash be a better fit to the data than an array of key/value pairs anyway? What are you trying to achieve by this approach? There is likely a better way. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/yDOmbdqEY_sJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.