[chef] Re: Notifiaction drives Execution No Matter What


Chronological Thread 
  • From: Andrew Gross < >
  • To: chef < >
  • Subject: [chef] Re: Notifiaction drives Execution No Matter What
  • Date: Mon, 20 May 2013 15:43:37 -0400

For the case where I want a "not_if" to guard against some action, I add in an extra execute block.  It will do nothing except run the "not_if" block and notify the original execute block to run.  The only downside is you now have two different ways to call the original execute block, so it is possible to get confused an perform dangerous actions.


On Mon, May 20, 2013 at 3:20 PM, < " target="_blank"> > wrote:
Let's say I have 2 resources: a template and an execute resource.  The execute
resource has a "not_if", "only_if", or "creates" that causes it to
conditionally execute based on something other than the template.  The template
notifies the execute resource when the template is updated.

Is there some idomatic common way to cause the execute resource to always be
executed when it receives a notification regardless of conditional?

From what I've seen, the execute gets the notification, but doesn't execute
because the conditional evaluation isn't taking the notification into account.
It would be nice if there was some mechanism for the template to tell the
execute resource to execute no matter what.  This could be true of any
resource, not just templates and execute resources.




Archive powered by MHonArc 2.6.16.

§