I'd like to create an execute block which is only run when some specific condition is met (in this case if an interface wlan0 is present). Alternatively, I'd like to prevent the notifies clause of a template on the same condition.

How can I describe that in a recipe? I could of course put the whole condition in the execute's command, but I hope there's a better way to achieve this...

link|improve this question

64% accept rate
feedback

1 Answer

up vote 1 down vote accepted

Go to: http://wiki.opscode.com/display/chef/Resources

Look at the section titled "Conditional Execution"

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.