Skip to content

Instantly share code, notes, and snippets.

@scalp42
Forked from coderanger/README.md
Created March 24, 2014 23:28
Show Gist options
  • Select an option

  • Save scalp42/9751614 to your computer and use it in GitHub Desktop.

Select an option

Save scalp42/9751614 to your computer and use it in GitHub Desktop.

To use this snippet first replace the _default in the URL with your environment name if you are using somethign other than the global default. Next in the run list, replace ... with your cookbook names. Unlike other run lists, you cannot have roles here, and you don't use the 'recipe[foo]' syntax, just 'foo'.

knife exec -E 'puts api.post("/environments/_default/cookbook_versions", "run_list" => [...]).map{|key, val| "#{key} #{val.version}"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment