Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > FAQs > How do I prevent my chef recipes from running during a reboot?

How do I prevent my chef recipes from running during a reboot?

Table of Contents

Background

Chef has it's own properties for checking if a machine is rebooting, or launching. Some people find this a little hard to understand and work with and will ask the question, 'How do I prevent my chef recipes from running during a reboot?'

Answer

It is generally a good idea to try and design your recipes along the lines of idempotency. The best way to do this, is to utilize "not_if" or "only_if" within your recipes, as that will ensure that the recipes are not run again. If you aren't familiar with either command, you can find some documentation on them, here:
 

 

In addion to this, our own Chef Cookbooks Developer Guide is continually growing and contains lots of very useful information and guidance, on how you should write your chef recipes and cookbooks to work with RightScale.

You must to post a comment.
Last modified
21:29, 16 May 2013

Tags

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.