Skip to content

Instantly share code, notes, and snippets.

@coderanger
Last active August 29, 2015 13:56
Show Gist options
  • Save coderanger/9198932 to your computer and use it in GitHub Desktop.
Save coderanger/9198932 to your computer and use it in GitHub Desktop.
Command to run depsolver

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