Hi,

I'd like to be able to use subscribe with exec to refresh when files
change, but I'd like each refresh to be dependent on another exec--
e.g., to test configuration syntax.  The closest I've been able to
come is what I have below (I've removed some of the rest of the
detail), but the problem is that reload-squid will get triggered every
time check-squid runs, regardless of undesired return status.  I've
tried a few other variants, with similar success.  Any other ideas?
The ideal option would be to restore from backup if a particular exec
fails.  Is anything like that available or in the roadmap?

Regards,
Casey

---------

class squid {
   file { "squid.conf":
      path => "/etc/squid/squid.conf",
      ensure => file,
      owner => "root",
      group => "squid",
      mode => 0640,
      source => [
            "puppet://$server/squid/squid.conf"
      ],
   }
   exec { "check-squid":
      command => "/usr/sbin/squid -k parse",
      subscribe => File["squid.conf"],
      refreshonly => true,
   }
   exec { "reload-squid":
      command => "/etc/init.d/squid reload",
      subscribe => Exec["check-squid"],
      refreshonly => true,
   }
}

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