cookbook 'cookbook_versions', '~> 1.0.0'
cookbook_versions (4) Versions 1.0.0 Follow0
Installs/Configures cookbook_versions
cookbook 'cookbook_versions', '~> 1.0.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'
What is included
By default, cookbook_versions includes only cookbooks that have a recipe in the run_list.
This will not include cookbooks that provide resources but don't have recipes.
You can change this behavior by either using the cookbook_versions::all
recipe instead of the default recipe in your run_list
, or by passing the all_cookbooks true
attribute to the resource:
cookbook_versions 'whatever' do all_cookbooks true end
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
1.0.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.0.0 failed this metric
FC075: Cookbook uses node.save to save partial node data to the chef-server mid-run: cookbook_versions/libraries/cookbook_versions_provider.rb:18
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.0.0 passed this metric
Testing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.0 passed this metric
1.0.0 failed this metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.0.0 failed this metric
FC075: Cookbook uses node.save to save partial node data to the chef-server mid-run: cookbook_versions/libraries/cookbook_versions_provider.rb:18
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.0.0 passed this metric
Testing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.0 passed this metric
1.0.0 failed this metric
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
1.0.0 passed this metric
Testing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.0 passed this metric
1.0.0 failed this metric
1.0.0 passed this metric