cookbook 'cookbook_versions', '= 0.2.0'
cookbook_versions (4) Versions 0.2.0 Follow0
Installs/Configures cookbook_versions
cookbook 'cookbook_versions', '= 0.2.0', :supermarket
knife supermarket install cookbook_versions
knife supermarket download cookbook_versions
cookbook_versions
This cookbook examines all of the cookbooks in a node's run_list
and extracts the cookbook versions. These are saved into node attributes under the 'cookbook_versions' key, like so:
cookbook_versions => { "cookbook_versions_test": "0.1.0", "cookbook_versions": "0.1.0" }
NOTE: This cookbook_versions
resource should be run at the end of a chef-client run, or else recipes may modify the run_list
and that won't be reflected in the node attributes.
Usage
You can use the resource directly, or include the default recipe which simply calls the resource
cookbook_versions 'whatever'
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Foodcritic Metric
0.2.0 failed this metric
FC031: Cookbook without metadata file: /tmp/cook/28606b432de4e317fe309f30/cookbook_versions/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/28606b432de4e317fe309f30/cookbook_versions/metadata.rb:1
0.2.0 failed this metric
FC045: Consider setting cookbook name in metadata: /tmp/cook/28606b432de4e317fe309f30/cookbook_versions/metadata.rb:1