I'm using the SimpleText recipe and Augeas plugin to modify files in place. I'd like to notify the appropriate File resource that a modification is about to take place so puppet can backup the file. Maybe this is already possible but I haven't found any examples or documentation on how to accomplish this. I think a natural way to do this would be to use the subscribe or notify parameters, something like this.
class sshd { package { "openssh-server": ensure => installed } file { "sshd_config": name => $operatingsystem ? { default => "/etc/ssh/sshd_config" }, } service { "sshd": name => $operatingsystem ? { default => sshd }, hasrestart => true, hasstatus => true, ensure => running, subscribe => [Package["openssh-server"], File["sshd_config"]] } augeas { "sshd_config_port" : notify => [ Service["sshd"], File["sshd_config"] ] context => "/files/etc/ssh/sshd_config", changes => "set Port 22", onlyif => "get Port != 22", } } -- 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 -~----------~----~----~----~------~----~------~--~---