On Thursday, November 29, 2012 10:18:48 AM UTC-6, Schofield wrote: > > Looking at this now actually. the source and sourceselect attributes of > File are probably what I want. However the source attribute is order > dependent when determining which file gets applied. Would you know if the > +> operator pre or post pends to an existing array? Is there a way to > enforce the array ordering when appending? Haven't found documentation on > this so will be doing some trial and error. > > I do not know for sure whether +> prepends or appends, but my guess would be that it appends. Whichever way it does it, you can rely on Puppet to be consistent. As far as I know, there is no way to switch the order. Of course, the subclass can always replace the source array instead of appending. With judicious use of class variables, you could even do that without duplicating the source list anywhere.
Alternatively, if your approach is going to be to fiddle with the 'source' parameter then you might consider how to avoid subclassing at all. One way would be to load your source(s) via hiera. Another might leverage File's behavior of skipping sources that don't exist: for example, if one or more of your sources are declared in terms of the $hostname fact, then you can create hostname-based overrides entirely within your source data for only the nodes you want. 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/-/T2jGulWMySUJ. 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.