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.

-- 
Joel Nimety
Perimeter eSecurity
Product Architect, Email Defense
203.541.3416
[EMAIL PROTECTED]
http://www.perimeterusa.com



--
 The sender of this email subscribes to Perimeter eSecurity's email
 anti-virus service. This email has been scanned for malicious code and is
 believed to be virus free. For more information on email security please
 visit: http://www.perimeterusa.com/email-defense-content.html
 This communication is confidential, intended only for the named recipient(s)
 above and may contain trade secrets or other information that is exempt from
 disclosure under applicable law. Any use, dissemination, distribution or
 copying of this communication by anyone other than the named recipient(s) is
 strictly prohibited. If you have received this communication in error, please
 delete the email and immediately notify our Command Center at 203-541-3444.

 Thanks 

--~--~---------~--~----~------------~-------~--~----~
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