cookbook 'jn_sysctl', '= 1.1.0'
jn_sysctl (6) Versions 1.1.0 Follow5
Configure/Set sysctl paramaters
cookbook 'jn_sysctl', '= 1.1.0', :supermarket
knife supermarket install jn_sysctl
knife supermarket download jn_sysctl
DESCRIPTION
Manage sysctl sysctl provider.
Default recipe reads key value pairs from node attributes and ensures the system state.
NOTE: If you are getting this from the community site I've renamed it jn_sysctl, you will have to rename the cookbook to sysctl
WARNING: The default behavior is to write out /etc/sysctl.conf, which if you don't have settings in chef means you can kill your existing config.
Attributes
- sysctl: Hash of k/v pairs with sysctl settings.
Sysctl LWRP
Properties
- name: The key name. Defaults to the resource name i.e. sysctl "some.key"
- value: what to set this key to
- save: save the setting back to the node data (default: yes)
Actions
- :set Make sure the running state is set (default)
- :write Write the config file (default)
Known Bugs
- only really tested on CentOS/RedHat and Linux in general. YMMV on other platforms
Example Usage
LWRP
Ensure running state, and write this key to sysctl.conf
sysctl "kernel.sysrq" do
value 1
end
Check out recipes/example.rb For more recipe examples.
Attributes
In a role attribute or override:
{
"sysctl": {
"net.ipv4.tcp_window_scaling": 0
}
}
Check out attributes/example.rb For more attribute examples.
Change Log
- 1.1.0: Adding in :write action support so that it writes /etc/sysctl
- 1.0.2: Initial public release
Author and License
Author Jesse Nelson spheromak@gmail.com
Copyright 2011, Jesse Nelson
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.