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

RSS

jn_sysctl (6) Versions 2.0.1

Configure/Set sysctl paramaters

Policyfile
Berkshelf
Knife
cookbook 'jn_sysctl', '~> 2.0.1', :supermarket
cookbook 'jn_sysctl', '~> 2.0.1'
knife supermarket install jn_sysctl
knife supermarket download jn_sysctl
README
Dependencies
Quality 17%

DESCRIPTION

Manage sysctl via a sysctl provider.

NOTE: If you are getting this from the community site it's named jn_sysctl. Due to some internal requirements the metadata sets it's name to "sysctl" this could cause some confusion.

WARNING: The default behavior on non-debian flavors is to write out /etc/sysctl.conf, which if you don't have settings in chef means you can kill your existing config. the sysctl_file atribute can control where this file goes in a role/override if you wish.

Attributes

  • sysctl: Hash of k/v pairs with sysctl settings.
  • sysctl_file: The location we write out the configuration defaults to /etc/sysctl.conf on anything not debian flavor defaults to /etc/sysctl.d/99-chef.conf on debian

Recipes

  • attribute_driver.rb: Reads attributes set in node[:sysctl][:values], and sets sysctl resources with the values
  • default.rb: Simply sets up the resources needed to use the lwrp
  • library.rb: Empty recipe if you want to avoid default, but still want to explicitly include (for whatever reason)

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: false)

Actions

  • :set Make sure the running state is set (default)
  • :write Write the config file (default)

Known Bugs

  • only intended to be used on Linux

Example Usage

LWRP

Ensure running state, and write this key to sysctl.conf

sysctl "kernel.sysrq" do
   value 1
end

Check out example/recipes/example.rb For more recipe examples.

Attributes

In a role attribute or override:

{
  "sysctl": {
    "net.ipv4.tcp_window_scaling": 0
  }
}

Check out example/attributes/example.rb For more attribute examples.

Author and License

Author Jesse Nelson spheromak@gmail.com

Copyright 2011-2013, 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

accumulator >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

2.0.1 failed this metric

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

Contributing File Metric
            

2.0.1 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 https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

2.0.1 failed this metric

FC007: Ensure recipe dependencies are reflected in cookbook metadata: jn_sysctl/recipes/attribute_driver.rb:28
FC046: Attribute assignment uses assign unless nil: jn_sysctl/attributes/default.rb:1
FC046: Attribute assignment uses assign unless nil: jn_sysctl/attributes/default.rb:2
FC064: Ensure issues_url is set in metadata: jn_sysctl/metadata.rb:1
FC065: Ensure source_url is set in metadata: jn_sysctl/metadata.rb:1
FC066: Ensure chef_version is set in metadata: jn_sysctl/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: jn_sysctl/metadata.rb:1
FC069: Ensure standardized license defined in metadata: jn_sysctl/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: jn_sysctl/resources/default.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: jn_sysctl/providers/default.rb:68
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

2.0.1 passed this metric

Testing File Metric
            

2.0.1 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 https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

2.0.1 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 https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number