Issue #3181 has been updated by Luke Kanies. Status changed from Needs design decision to Needs more information Assigned to deleted (Luke Kanies)
I like the basic idea, but the design needs to be fleshed out a bit more. Could you provide a bit more info on how you use this? ---------------------------------------- Feature #3181: Create resource if it doesn't already exist (with array support) http://projects.reductivelabs.com/issues/3181 Author: Tim Stoop Status: Needs more information Priority: Normal Assigned to: Category: functions Target version: Affected version: 0.25.4 Keywords: Branch: Hi all, I'm currently looking for a way to say something like "create this resource if it doesn't already exist". The current way to do this, is simply checking with <pre>if ! defined(Resource['$resname']) { resource{ '$resname':; } }</pre> which works with strings, but doesn't support arrays. And I'm running into several cases in which it would save me a lot of work if I could make this work if $resname is an array. I think more people can do something useful with this kind of functionality. Although you probably have a better idea what would fit, a syntax that would work for this is something like <pre>?resource { '$resname':; }</pre> Would be especially useful if it could also support virtual/exported resources, like so, for example: <pre>?@@resource { '$resname':; }</pre> Thanks in advance for considering this! -- 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://reductivelabs.com/redmine/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.
