Skip to content

Instantly share code, notes, and snippets.

@lusis
Created March 5, 2012 16:46
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lusis/1979216 to your computer and use it in GitHub Desktop.
Save lusis/1979216 to your computer and use it in GitHub Desktop.
# Do a bunch of shit that should only happen at initial setup
# file: cookbooks/foo/recipes/bootstrap.rb
# initial runlist role[foo],recipe[foo::bootstrap]
# useful for downloading an initial codebase of an application
# as opposed to attempting to reinstall each time
ruby_block "remove_bootstrap_recipe" do
block do
Chef::Log.info("Removing foo boostrap from runlist")
node.run_list.remove("recipe[foo::bootstrap]") if node.run_list.include?("recipe[foo::bootstrap]")
end
action :create
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment