Chef cookbook to manage sysfs
Ruby
Pull request Compare This branch is 9 commits behind Youscribe:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
attributes
providers
recipes
resources
README.md
file_edit_patch.rb
metadata.json
metadata.rb

README.md

Description

Set sysfs values from Chef!

Attributes

Usage

With Ressource/Provider.

Resource/Provider

sysfs

Actions

  • :save - Save and set a sysfs value (default).
  • :set - Set a sysfs value.
  • :remove - Remove a (previous set) sysfs.

Attribute Parameters

  • variable - Variable to manage. e.g. devices/system/cpu/cpu0/cpufreq/scaling_governor, block/sda/queue/scheduler.
  • value - Value to affect to variable. e.g. 1, 0, noop.

Examples

sysfs 'block/sda/queue/scheduler' do
  value 'noop'
end

# the same.
sysctl 'set io scheduler to cfq' do
  variable 'block/sda/queue/scheduler'
  value 'cfq'
end

sysctl 'block/sda/queue/scheduler' do
  action :remove
end

# Set set scaling governator but don't save it.
sysctl 'devices/system/cpu/cpu0/cpufreq/scaling_governor' do
  action :set
  value 'powersave'
end