helm/rake/init.rake

16 lines
432 B
Ruby
Raw Normal View History

2014-04-11 00:31:44 -07:00
require_relative 'lib/output'
desc "Provision the node"
task :init,:node do |t,args|
args.with_defaults(:node => `hostname`.strip)
# TODO: chop of the *.local in osx hostnames
path = "#{File.dirname(__FILE__)}/node/#{args.node}.rb"
if File.exists?(path)
echo "Setting up node: #{args.node}"
require_relative "node/#{args.node}"
else
echo "#{args.node} node does not exist!"
end
end