Find a cookbook date in chef server
It may be that there is a difference between the API exposed by enterprise chef and that exposed in a private chef-server install. Below I am trying to find out the update/modification time of a cookbook on the chef-server. It should be that I can obtain this simply with a GET to the correct API object, but it seems not to work.
http://docs.opscode.com/api_cookbooks_site.html
http://docs.opscode.com/api_chef_server.html
http://blog.defunct.ca/2013/02/01/query-chef-server-api-from-ruby-script/
knife exec -E '(api.get "/cookbooks/rsyslog/").each { |response| pp response }'
["rsyslog", {"url"=>"https://192.168.112.11/cookbooks/rsyslog", "versions"=> [{"version"=>"1.10.2", "url"=>"https://192.168.112.11/cookbooks/rsyslog/1.10.2"}, {"version"=>"1.9.1", "url"=>"https://192.168.112.11/cookbooks/rsyslog/1.9.1"}]}]
query chef API with ruby
notes on knife exec
excellent knife exec examples
clear knife one-liners
chef 10 knife exec examples. Wiki often has better material than the rest of the opscode docs.
great example of using knife since the changes in the API. I should examine this more closely to get the differences clear.
A good example of a recent knife exec script by Joshua Timberman
















