Few Rubyisms


While looking at some bits of other peoples Ruby code I came across a few shortcuts and interesting structures worth mentioning. Exception handling shortcut First up a shortcut to catch exceptions thrown by a method: def say_foo puts "foo" if doit rescue Exception puts "#fail" end So since we didn’t define doit this will raise Read More

MCollective 0.4.3 Auditing


I just released version 0.4.3 of mcollective which brings a new auditing capability to SimpleRPC. Using the auditing system you can log to a file on each host every request or build a centralized auditing system for all requests on all nodes. We ship a simple plugin that logs to the local harddrive but there Read More

Better way to query facts


Facter has some annoying bug where it won’t always print all facts when called like facter fact, ones that require dynamic lookups etc just won’t print. This is a long standing bug that doesn’t seem to get any love, so I hacked up a little wrapper that works better. #!/usr/bin/ruby   require ‘facter’ require ‘puppet’ Read More

Newer Posts
Older Posts