Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


chrome (28) Versions 4.0.2

Installs/Configures Chrome browser

cookbook 'chrome', '~> 4.0.2', :supermarket
cookbook 'chrome', '~> 4.0.2'
knife supermarket install chrome
knife supermarket download chrome
Quality 17%

Chrome Cookbook

Cookbook Version

This cookbook installs Google Chrome browser ( at compile time, provides
chrome_version library method to retrieve Chrome version installed, and provides master_preferences resource
to set user preferences.


Chef 12.14+


  • CentOS 7, Red Hat 7, Fedora
  • Debian, Ubuntu
  • Mac OS X
  • Windows


  • dmg - used by Mac OS X platform


Include the default recipe on a node's runlist to ensure that Chrome is installed.

A library method chrome_version is provided to retrieve the Chrome version installed:

v = chrome_version

Tip: use allow_any_instance_of to stub chrome_version method when testing with rspec:

allow_any_instance_of(Chef::Recipe).to receive(:chrome_version).and_return('')


  • node['chrome']['track'] - For Linux only. Install stable, beta or unstable version. Default is stable.
  • node['chrome']['32bit_only'] - For windows only. Install 32-bit browser on 64-bit machines. Default is false.

See attributes/default.rb for complete list
of attributes.


Manage a template resource that configures master_preferences.
More info...

Resource Attributes

  • name - The name of the preference.
  • cookbook - Optional. Cookbook where the source template is. If this is not defined, Chef will use the named template in the cookbook where the definition is used.
  • template - Default master_preferences.json.erb, source template file.
  • parameters - Additional parameters, see Examples.


The following example would look for a template named master_preferences.json.erb in your cookbook:

chrome 'custom_preferences' do
    homepage: ''
    import_bookmarks_from_file: 'c:\path\to\bookmarks.html'
  action :master_preferences

The Chrome cookbook comes with a master_preferences.json.erb template as an example. The following parameter is used
in the template:

  • homepage - Sets the homepage URL.

To use the default template preferences, set cookbook to chrome, for example:

chrome 'set_user_preferences' do
  cookbook 'chrome'
    homepage: ''
  action :master_preferences

The parameter specified will be used as:

  • @parameters[:homepage]

In the template, when you write your own, the @ is significant.

ChefSpec Matchers

This cookbook includes custom ChefSpec matchers you can use to test your
own cookbooks.

Example Matcher Usage

expect(chef_run).to master_preferences_chrome('name').with(
  parameters: {
    homepage: ''

Cookbook Matchers

  • master_preferences_chrome(name)

Getting Help


Please refer to CONTRIBUTING.


MIT - see the accompanying LICENSE file for details.


4.0.2 2017-06-15

  • Adding the chefignore to make our internal chef-guard happy

4.0.1 2017-05-18

  • All Deb Package for Stable,Beta,Unstable are in the stable uri
  • Don't install chrome if already installed

4.0.0 2017-04-11

  • Rename master_preferences' params attribute to parameters to be Chef 13 compatible

3.0.0 2017-01-09

  • Require Chef client 12.14 or greater
  • Remove apt and yum cookbook dependencies

2.0.1 2017-01-09

  • PR #15 Default apt arch to amd64

2.0.0 2016-10-01

  • Dropped support for Chef 11

1.2.2 2016-06-03

  • PR #11 Use the machine key as opposed to processor

1.2.1 2016-05-13

  • Fix #10 OSX 10.9 chrome_version throws exception

1.2.0 2016-05-12

  • Constrain apt package to a particular arch

1.1.1 2015-09-27

  • Fix #7 Chef::Exceptions::InvalidRemoteFileURI on Windows platform


  • Fix FC052: Metadata uses the unimplemented "suggests" keyword
  • Update metadata description, source_url and issues_url


  • Remove 'Google Chrome' string from chrome_version for mac installations
  • Add separate kitchen yaml for mac
  • Replace contributors file with link to github


  • Remove Chef 12 source_url and issues_url from metadata


  • Use correct apt repository name


  • Revert fix for apt-get issue with updated Google sign key


  • Add apt unit tests


  • Fix apt-get issue with updated Google sign key


  • Fix windows master preferences path


  • Fix mac issues


  • Fix rubocop offenses


  • Fix readme rendering issue on supermarket


  • Rename .chefignore to chefignore


  • Fix Chef Client 12 introduced error: undefined method `new' for Chrome:Module
  • Remove trailing space from chrome_version
  • Add .chefignore


  • Support multiple platforms
  • Rename preferences resource to master_preferences


  • Add 64-bit support for windows


  • Add chrome_version method
  • Install Chrome at compile time
  • Warn if not windows platform


  • Add preferences resource


  • Initial release

Collaborator Number Metric

4.0.2 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

4.0.2 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, and your repo must contain a file

Foodcritic Metric

4.0.2 failed this metric

FC121: Cookbook depends on cookbook made obsolete by Chef 14: chrome/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric

4.0.2 passed this metric

Testing File Metric

4.0.2 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, and your repo must contain a file

Version Tag Metric

4.0.2 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, and your repo must include a tag that matches this cookbook version number