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


sanitize (19) Versions 0.1.2

Sanitizes system by providing a sane default configuration

cookbook 'sanitize', '= 0.1.2'
cookbook 'sanitize', '= 0.1.2', :supermarket
knife supermarket install sanitize
knife supermarket download sanitize
Quality -%


This cookbook aims to normalize setup of a fresh server and set sane defaults for global settings, and work with various initial environments (tested on EC2 images, Hetzner "minimal" installations, and debootstrap-created LXC images). At the moment it supports only Ubuntu, Debian support is planned.

This cookbook is developed on GitHub at


  • apt
  • build-essential
  • iptables


  • sanitize.iptables -- if false, does not install and configure iptables; defaults to true.

  • sanitize.apt_repositories -- dictionary of APT repositories to add. Key is repository name, value is remaining attributes of the apt_repository resource provided by the apt cookbook (see If you set distribution to "lsb_codename", node['lsb']['codename'] attribute will be used instead. Example:

    :sanitize => { :apt_repositories => { :percona => { :uri => '', :distribution => 'lsb_codename', :components => [ 'main' ], :deb_src => true, :keyserver => 'hkp://', :key => '1C4CBDCDCD2EFD2A' }}}

  • sanitize.install_packages -- a list of packages to install on all machines; defaults to an empty list.


Include recipe[sanitize] in your run list after your user accounts are created and sudo and ssh is configured.


This is the default "base settings" setup. It should be called after shell user accounts and sudo are configured, as it locks default login user and direct root access.

  1. Deletes ubuntu system user
  2. Locks system password for root user (assumes that only sudo is used to elevate privileges)
  3. Ensure all FHS-provided directories exist by creating some that have been found missing on some of the installation (namely, /opt)
  4. Sets locale to en_US.UTF-8, generates this locale, sets time zone to UTC
  5. Changes mode of /var/log/chef/client.log to 0600 -- readable only for root, as it may contain sensitive data
  6. Deletes annoying motd.d files
  7. Installs vim and sets it as a default system editor
  8. Installs and configures iptables, opens SSH port (optional, but enabled by default)
  9. Installs can-has command as a symlink to apt-get


Plans for future, in no particular order:

  • Depend on and include openssh-server; configure SSH known hosts, provide sane SSH server and client configuration defaults
  • Provide hooks (definitions / LWRP / library) for other cookbooks for commonly used facilities, such as opening up common ports, "backend" http service, SSL keys management, maybe some other "library" functions like helpers for encrypted data bags

Dependent cookbooks

iptables >= 0.0.0
build-essential >= 0.0.0
apt >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found