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

RSS

fb_swap (1) Versions 0.1.0

Controls swap enable/disable

Berkshelf
Policyfile
Knife
cookbook 'fb_swap', '~> 0.1.0'
cookbook 'fb_swap', '~> 0.1.0', :supermarket
knife supermarket install fb_swap
knife supermarket download fb_swap
README
Dependencies
Quality 50%

fb_swap Cookbook

This cookbook enables or disables swap.

Requirements

This cookbook assumes the machine will have either zero or one swap partition defined in /etc/fstab. It does not support swap files and more than one swap partition.

Attributes

  • node['fb_swap']['enabled']
  • node['fb_swap']['size']
  • node['fb_swap']['enable_encryption']

Usage

You can disable swap with:

node.default['fb_swap']['enabled'] = false

or you can enable swap if its off like this:

node.default['fb_swap']['enabled'] = true

The default is true. You can also optionally define the size in kb of the swap device to use with node['fb_swap']['size']. This defaults to nil, which disables the resizing logic. The Chef run will fail if it's set to a value smaller than 1024 (i.e. 1 MB), which is assumed to be a typo (if you really want a swap device this small consider disabling swap altogether). Note that the value set is passed directly to mkswap, and should be no larger than the size of the actual block device; to prevent accidental destruction of data we only allow reducing the size of a swap device, not making it larger. The resize operation triggers a swap disable / enable, which could potentially trigger the OOM killer if the machine is under memory pressure.

You can enable encrypted swap with:

node.default['fb_swap']['enable_encryption'] = true

or you can turn it off like this:

node.default['fb_swap']['enable_encryption'] = false

The default is false. We use dm-crypt/LUKS for the encryption. For details see cryptsetup(8).

Dependent cookbooks

fb_systemd >= 0.0.0
fb_helpers >= 0.0.0
fb_dracut >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.1.0 failed this metric

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

Contributing File Metric
            

0.1.0 passed this metric

Foodcritic Metric
            

0.1.0 failed this metric

FC064: Ensure issues_url is set in metadata: fb_swap/metadata.rb:1
FC066: Ensure chef_version is set in metadata: fb_swap/metadata.rb:1
Run with Foodcritic Version 14.0.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.1.0 passed this metric

Publish Metric
            

0.1.0 passed this metric

Supported Platforms Metric
            

0.1.0 passed this metric

Testing File Metric
            

0.1.0 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
            

0.1.0 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