This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"interfaces": { | |
"DATA Bond0": { | |
"mask": "255.255.255.240", | |
"ip": "10.33.82.84", | |
"bond": "mode=active-backup miimon=100 updelay=100", | |
"dev": "bond0" | |
}, | |
"DATA Bond0-vip": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bin="$( readlink -f -- "${0%/*}" )" | |
# assum bin is in chef_repo so nodes goto ../nodes/* | |
if [ -d $Bin/../nodes/$node ] ; then | |
for node in `knife node list -F text | awk -F\" '{print $2}'` ; do | |
echo "dumping $node" | |
knife node show $node > $Bin/../nodes/$node.json | |
done | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yum installed and available lists don't have a version of package ruby-oci8 | |
/var/cache/chef/file_cache/cookbooks/helpers/libraries/yum.rb:751:in `load_current_resource' | |
/usr/local/chef/chef-bundle/ruby/1.9.1/gems/chef-0.9.16/lib/chef/resource.rb:394:in `run_action' | |
/usr/local/chef/chef-bundle/ruby/1.9.1/gems/chef-0.9.16/lib/chef/runner.rb:53:in `run_action' | |
/usr/local/chef/chef-bundle/ruby/1.9.1/gems/chef-0.9.16/lib/chef/runner.rb:89:in `block (2 levels) in converge' | |
/usr/local/chef/chef-bundle/ruby/1.9.1/gems/chef-0.9.16/lib/chef/runner.rb:89:in `each' | |
/usr/local/chef/chef-bundle/ruby/1.9.1/gems/chef-0.9.16/lib/chef/runner.rb:89:in `block in converge' | |
/usr/local/chef/chef-bundle/ruby/1.9.1/gems/chef-0.9.16/lib/chef/resource_collection.rb:94:in `block in execute_each_resource' | |
/usr/local/chef/chef-bundle/ruby/1.9.1/gems/chef-0.9.16/lib/chef/resource_collection/stepable_iterator.rb:116:in `call' | |
/usr/local/chef/chef-bundle/ruby/1.9.1/gems/chef-0.9.16/lib/chef/resource_collection/stepable_iterator.rb:116:in `ca |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# is this damn thing already mounted ? | |
def is_mounted?(device) | |
check_mount = Chef::ShellOut.new("mount | grep -q '#{device}'") | |
check_mount.run_command | |
return true if 0 == check_mount.status | |
# might as well follow the link like mount does | |
# recursion is fun | |
return is_mounted?(Pathname.new(device).realpath.to_s) if File.symlink?(device) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ^^ yes this isn't os independent | |
case "$OSTYPE" in | |
solaris*) echo "SOLARIS" ;; | |
darwin*) echo "OSX" ;; | |
linux*) echo "LINUX" ;; | |
bsd*) echo "BSD" ;; | |
*) echo "unknown: $OSTYPE" ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
ARGF.each_line { |e| puts e.chomp.reverse } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chef::Platform.platforms[:xenserver] = { | |
:default => { | |
:service => Chef::Provider::Service::Redhat, | |
:cron => Chef::Provider::Cron, | |
:package => Chef::Provider::Package::Yum, | |
:mdadm => Chef::Provider::Mdadm | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package "heartbeat-ldirectord" do | |
action :install | |
end | |
lb = node[:heartbeat][:cluster] | |
# find all nodes that think they belong to a service | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
(C) 2010 Pragmatic Source | |
Farzad FARID <[email protected]> | |
register_chef.py: Register the server being installed on the Chef server | |
We assume that the 'knife' is installed locally on the Cobbler server. | |
Check https://fedorahosted.org/cobbler/wiki/CobblerTriggers for | |
documentation on Cobbler's triggers and API. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if node.chef_environment != 'development' | |
cookbooks = {} | |
node.cookbook_collection.values.each {|c| cookbooks[c.name.to_s] = c.version.to_s } | |
# See https://github.com/danryan/spice | |
r = gem_package "spice" do | |
version "0.8.0" | |
end | |
r.run_action(:install) |