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
[Mon, 06 Feb 2012 19:59:35 +0000] INFO: Processing chef_handler[Medidata::RunLoggerHandler] action enable (mdsol_oq::default line 60) | |
[Mon, 06 Feb 2012 19:59:35 +0000] ERROR: chef_handler[Medidata::RunLoggerHandler] (mdsol_oq::default line 60) has had an error | |
[Mon, 06 Feb 2012 19:59:35 +0000] ERROR: chef_handler[Medidata::RunLoggerHandler] (/var/cache/chef/cookbooks/mdsol_oq/recipes/default.rb:60:in `from_file') had an error: | |
chef_handler[Medidata::RunLoggerHandler] (mdsol_oq::default line 60) had an error: wrong number of arguments (1 for 0) | |
/var/chef/handlers/runlogger.rb:7:in `initialize' | |
/var/cache/chef/cookbooks/chef_handler/providers/default.rb:24:in `new' | |
/var/cache/chef/cookbooks/chef_handler/providers/default.rb:24:in `block in class_from_file' |
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
def initialize(*args) | |
super(*args) | |
@command = 'foo' | |
end | |
action :create do | |
Chef::Log.debug("Command: #{@command}") | |
end |
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
module Scoreable | |
attr_accessor :score | |
def increment | |
@score += 1 | |
end | |
def decrement | |
@score -= 1 | |
end |
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 | |
cbdir=ARGV[0] | |
output = "./deps.dot" | |
puts "Running on #{cbdir}..." | |
cb_meta = Dir.glob("#{cbdir}/*/metadata.rb") | |
fp=File.open(output,"w") |
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
class Machine < Struct.new(:name,:ipaddress,:role,:env) | |
def print_machine_csv | |
name.length==0 ? printf(",") : printf("\"%s\",", name) | |
address.length==0 ? printf(",") : printf("\"%s\",", address) | |
role.length==0 ? printf(",") : printf("\"%s\",", role) | |
env.length==0 ? printf(",") : printf("\"%s\",", env) | |
printf("\n") | |
end | |
end unless defined? Machine |
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
Vagrant::Config.run do |global_config| | |
aptdir = (ENV['APTCACHE'] or "#{ENV['HOME']}/aptcache/") | |
checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks") | |
ip_prefix = (ENV['IP_PREFIX'] or "192.168.76.") | |
mac_prefix = (ENV['MAC_PREFIX'] or "080027076") | |
fixed = (ENV['FIXED'] or "10.0.76.0/24") | |
global_config.vm.define :chef do |config| | |
suffix = "100" | |
ip = "#{ip_prefix}#{suffix}" | |
config.vm.box = "base" |
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
;;; http-twiddle.el -- send & twiddle & resend HTTP requests | |
;; This program belongs to the public domain. | |
;; Author: Luke Gorrie <[email protected]> | |
;; Maintainer: Hasan Veldstra <[email protected]> | |
;; Created: 1 Feb 2006 | |
;; Adapted-By: Hasan Veldstra | |
;; Adapted-By: Christopher Brown <[email protected]> | |
;; Version: 1.0 |
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 | |
require 'rubygems' | |
require 'chef' | |
require 'chef/client' | |
require 'chef/run_context' | |
Chef::Config[:solo] = true | |
Chef::Config[:log_level] = :info | |
Chef::Log.level(:info) |
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
require 'time' | |
start_time = Time.parse("2010-09-22T18:50 -0700") | |
end_time = Time.parse("2010-09-22T18:50 -0930") | |
search_vols = mailbegs01_meatdisk_vols = %w[ | |
vol-f4e1999d | |
vol-c2e199ab | |
vol-5435763d | |
vol-5235763b |
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
define :email_alias, :recipients => [] do | |
execute "newaliases" do | |
action :nothing | |
end | |
t = nil | |
begin | |
t = resources(:template => "/etc/aliases") | |
rescue ArgumentError | |
t = template "/etc/aliases" do |