module GetNodeList def get_node_list(filename) nodesArray = File.open(filename,"r") do |file| file.readlines.select{|line| line =~ /.+jp/ } end nodes = nodesArray.collect{|node| node.chomp()} hostname = `hostname` mynum = 0 if /[0-9]+/ =~ hostname then mynum = $&.to_i end nodes = nodes.rotate(mynum) return nodes end end