itamae/tasks/prep.rake

10 lines
272 B
Ruby
Raw Normal View History

2019-03-03 08:50:49 +00:00
#!/usr/bin/env rake
desc 'Invoke itamae command for the first time'
task :prep do
node = `ls -1 nodes/*.json | xargs -I % basename % .json | peco`
node.chomp!
sh "ITAMAE_PASSWORD=musashi bundle ex itamae ssh --host #{node} -j nodes/#{node}.json entrypoint.rb"
end