fix broken system method in rake task
This commit is contained in:
6
Rakefile
6
Rakefile
@@ -4,14 +4,14 @@ require 'vagrant'
|
|||||||
|
|
||||||
env = Vagrant::Environment.new(:cwd => File.dirname(__FILE__), :ui_class => Vagrant::UI::Colored)
|
env = Vagrant::Environment.new(:cwd => File.dirname(__FILE__), :ui_class => Vagrant::UI::Colored)
|
||||||
|
|
||||||
def system (cmd)
|
def cmd_system (cmd)
|
||||||
result = system cmd
|
result = system cmd
|
||||||
raise(RuntimeError, $?) unless $?.success?
|
raise(RuntimeError, $?) unless $?.success?
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def on_box (box, cmd)
|
def on_box (box, cmd)
|
||||||
system("vagrant ssh #{box} -c '#{cmd}'")
|
cmd_system("vagrant ssh #{box} -c '#{cmd}'")
|
||||||
end
|
end
|
||||||
|
|
||||||
# bring vagrant vm with image name up
|
# bring vagrant vm with image name up
|
||||||
@@ -38,7 +38,7 @@ namespace :openstack do
|
|||||||
|
|
||||||
desc 'clone all required modules'
|
desc 'clone all required modules'
|
||||||
task :setup do
|
task :setup do
|
||||||
system('librarian-puppet install')
|
cmd_system('librarian-puppet install')
|
||||||
end
|
end
|
||||||
|
|
||||||
task 'destroy' do
|
task 'destroy' do
|
||||||
|
|||||||
Reference in New Issue
Block a user