On Oct 13, 2008, at 10:24 AM, Joel Nimety wrote:

>
>
>
> Luke Kanies wrote:
>> On Oct 11, 2008, at 11:46 AM, Joel Nimety wrote:
>>
>>
>>
>> The problem with this is that by the time the 'file' resource has
>> gotten the 'notify' message, the file's already been changed so it's
>> too late to back it up.
>>
>> You'd either need your type to somehow track the files it's going to
>> change and back them up (which is what the ParsedFile types do), or
>> you'd need Puppet, as a whole, to keep track of files that *might*
>> change, back them up preemptively, and then remove any backups that
>> aren't needed.  Or something like that.
>>
>> Either way, this isn't easy.
>
> How about a pre-notify meta parameter?  Leave it to the external tool
> (augeas, exec, whatever) to decide if a file is about to be changed  
> and
> notify the File resource beforehand.  The File type would backup the
> file, no questions asked if notified to do so.

That would be a completely new subsystem to transactions -- instant  
action.  The 'notify' and 'subscribe' mechanisms all just involve  
queues.

I'm not entirely convinced that's the right solution, since it's not  
come up before; I'd prefer to find a way to fit it into the current  
design, rather than adding new functionality.

The augeas type could do this itself, of course -- automatically back  
up any files it should be notifying -- without adding a new subsystem.

-- 
Now and then an innocent man is sent to the legislature.
     --Kin Hubbard
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to