On Wednesday, November 28, 2012 6:15:24 PM UTC-6, Schofield wrote: > > I have a managed directory defined in one class. I need the ability to > update a subset of files in the managed directory from a puppet define. I > would like to simply define a new file resource that is a directory and > have the files from this new resource simply overlay the existing managed > directory. Of course I get a duplication declaration error since the File > titles would be the same. Is there anyway to achieve this? > > I realize I could just update the source files but I need the flexibility > to install to select nodes. > > You are focusing far too narrowly on a particular implementation. It may not be possible to achieve specifically what you're asking for, but there are several ways to reach the configuration objective that is your ultimate goal.
One thing you might be able to do is subclass the class that manages your directory, and override the File resource appropriately. Another thing you might be able to do is split out management of the files that need to vary (with the help of File's 'ignore' parameter, for instance) into separate classes, and apply the correct one of those classes based on whatever logic applies. Alternatively, perhaps you could template those files such that all nodes could use the same templates, and you wouldn't need conditional or special-case behavior in your manifests. There are other alternatives, too, but those are the most promising I have come up with. 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/-/IIcR-aP7c40J. 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.