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


hosts_from_search (3) Versions 0.1.1

Setup hosts file from a chef search

cookbook 'hosts_from_search', '= 0.1.1', :supermarket
cookbook 'hosts_from_search', '= 0.1.1'
knife supermarket install hosts_from_search
knife supermarket download hosts_from_search
Quality 0%

hosts_from_search Cookbook

Put other chef nodes in /etc/hosts.


This cookbook depends on the hosts_file cookbook.


Attribute Description  Type Default
['node_search_query'] Search query on node index to get the hosts that will be included in /etc/hosts file. String "*:*"



Just include hosts_from_search in your node's run_list:

  "run_list": [

The recipe will issue a query using the ['node_search_query'] attribute and setup a host entry for each result.


  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Dependent cookbooks

hosts_file ~> 0.2.2

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

hosts_from_search CHANGELOG

This file is used to list changes made in each version of the hosts_from_search cookbook.


  • [chirauki] - Initial release of hosts_from_search

Check the Markdown Syntax Guide for help with Markdown.

The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.

Foodcritic Metric

0.1.1 failed this metric

FC003: Check whether you are running with chef server before using server-specific features: /tmp/cook/5384300bc2efe230c429d1bf/hosts_from_search/recipes/default.rb:6