John, thanks for the response.  I added my comments inline.

On Thursday, November 29, 2012 9:18:18 AM UTC-5, jcbollinger wrote:
>
>
>
> 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.
>
Yep, exploring my options and learning:) 

>
> One thing you might be able to do is subclass the class that manages your 
> directory, and override the File resource appropriately.
>
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.

>
> 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/-/zb4I05D40gMJ.
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.

Reply via email to