Created
May 1, 2011 22:06
-
-
Save ewhauser/950920 to your computer and use it in GitHub Desktop.
Knife csshx
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
# Use csshX to open terminals on the nodes found in a search | |
# knife exec csshx.rb 'role:the_role' | |
abort("usage: knife exec csshx SEARCH_TERM") unless ARGV[2] | |
nodes = search(:node, "#{ARGV[2].to_s}").collect { |n| n.fqdn } | |
exec('csshX ' + nodes.join(' ')) unless nodes.length < 1 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment