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


sysctl2 (4) Versions 0.1.1

Installs/Configures sysctl kernel parameter settings

cookbook 'sysctl2', '= 0.1.1', :supermarket
cookbook 'sysctl2', '= 0.1.1'
knife supermarket install sysctl2
knife supermarket download sysctl2
Quality -%

sysctl2 Cookbook

A cookbook to configure kernel parameters on a system. It supports configuring files in /etc/sysctl.d, and in /etc/sysctl.conf directly (mainly to support RHEL/CentOS 5 & 6).


Should support any linux platform, but has been tested successfully on:

  • rhel >= 5.0
  • centos >= 5.0
  • ubuntu >= 12.04
  • fedora >= 17.0



  • ['sysctl']['conf_dir']

    Type: String

    Description: The directory where the config file is located

    Default: /etc/sysctl.d

  • ['sysctl']['conf_file']

    Type: String

    Description: The config file name

    Default: 999-chef-sysctl.conf



Set attributes in the sysctl/params namespace to configure kernel parameters. Example values:

node.set['sysctl']['params']['kernel.sysrq'] = 0
node.set['sysctl']['params']['net.ipv4.ip_local_port_range'] = '30000 65000'

Then, just include sysctl2 in your node's run_list:

  "run_list": [

For platforms that don't support setting parameters via files in the /etc/sysctl.d directory (RHEL/CentOS 6 and lower), setting the sysctl/conf_dir attribute to '/etc' and the sysctl/conf_file attribute to 'sysctl.conf' will allow you to set kernel parameters in the correct/expected location for that platform. Unfortunatly, that also means that you'll need to be aware of kernel parameter changes in other recipies, and be sure to include them in your attribute list, in order to not miss them.

The default sysctl/conf_file attribute value gives us a reasonable chance of being the last config file applied. The files are processed according to their ASCII sort order, so there is still room to add more files to be processed after the recipe default file by naming the config file with leading character prefixes (ex. zzz-last.conf).

License and Authors

Authors: Michael Morris

License: 3-clause BSD

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found