chef
https://github.com/opscode/chef
Ruby
A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
Chef::Blacklist.filter
filter takes two arguments - the data you want to filter, and a blacklisted array
of keys you want discluded. You can capture a subtree of the data to filter by
providing a "/"-delimited string of keys. If some key includes "/"-characters,
you must provide an array of keys instead.
Blacklist.filter(
{ "filesystem" => {
"/dev/disk" => {
"size" => "10mb"
},
"map - autohome" => {
"size" => "10mb"
}
},
"network" => {
"interfaces" => {
"eth0" => {...},
"eth1" => {...}
}
}
},
["network/interfaces/eth0", ["filesystem", "/dev/disk"]])
will exclude the eth0 and /dev/disk subtrees.Edit
git clone [email protected]:opscode/chef.git
cd chef
open lib/chef/blacklist.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chef--Blacklist-filter-for-pr
# Commit to gitgit add lib/chef/blacklist.rbgit commit -m "better docs for Chef::Blacklist.filter"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chef--Blacklist-filter-for-pr
hub pull-request
# Celebrate!