How do i show the data of a cookbook on my chef server?
-
Obtain the versions of the cookbook on the chef server.
$ knife cookbook show cowsay cowsay 0.1.0
Check the data for the cookbook.
$ knife cookbook show cowsay 0.1.0 attributes: chef_type: cookbook_version cookbook_name: cowsay definitions: files: frozen?: false json_class: Chef::CookbookVersion libraries: metadata: attributes: chef_versions: >= 12.1 conflicting: dependencies: description: Installs/Configures cowsay gems: groupings: issues_url: ... ... ...
You can narrow down the data listed to the part you require.
$ knife cookbook show example 1.0.0 recipes checksum: e95bce41d0b0840fe5280f5b31886e95 name: default.rb path: recipes/default.rb specificity: default ... ... ...
Show the content of the default.rb recipes file for cookbook examples.
$ knife cookbook show example 1.0.0 recipes default.rb # This is a Chef recipe file. It can be used to specify resources which will # apply configuration to a server. log "Welcome to Chef, #{node['example']['name']}!" do level :info end # For more information, see the documentation: https://docs.chef.io/recipes.html
© Lightnetics 2024