Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

Look at the section titled "Conditional Execution"

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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