Hi, On 04/04/2011 12:14 PM, Marcus Downing wrote: > Correction: this only works if the place that uses the variable (the > 'file' resource) comes after the place where the variable is modified. > In our case that meant the child looks like this: > > class child { > $sources += [ '/path/to/second' ] > include parent > }
sorry to say this, but this looks hell of wrong to me. Don't do this based on variables. Don't even think of doing that. Variable scoping already has enough caveats as it is. You're obfuscating your end. What you probably want to do is this: class child inherits parent { File['...'] { source +> [ "/path/to/second" ] } } You override the resource's parameter using plusignment syntax. That would be sort of acceptable, but are you sure this facilitates a folder merge? Afaik, specifying multiple sources will make puppet choose the first that turns out to be valid and ignore all others. If you're in 2.6, according to the style guide, you should be using class parameters for thise instead of class inheritance as outlined above. HTH, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.