Yield accessory
This commit is contained in:
@@ -93,6 +93,7 @@ class Mrsk::Cli::Accessory < Mrsk::Cli::Base
|
|||||||
else raise "Unknown method: #{options[:method]}"
|
else raise "Unknown method: #{options[:method]}"
|
||||||
end.inquiry
|
end.inquiry
|
||||||
|
|
||||||
|
with_accessory(name) do |accessory|
|
||||||
if runner.exec_over_ssh?
|
if runner.exec_over_ssh?
|
||||||
run_locally do
|
run_locally do
|
||||||
info "Launching command on #{accessory.host}"
|
info "Launching command on #{accessory.host}"
|
||||||
@@ -102,6 +103,7 @@ class Mrsk::Cli::Accessory < Mrsk::Cli::Base
|
|||||||
on(accessory.host) { puts capture_with_info(*accessory.send(runner, cmd)) }
|
on(accessory.host) { puts capture_with_info(*accessory.send(runner, cmd)) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
desc "bash [NAME]", "Start a bash session on primary host (or specific host set by --hosts)"
|
desc "bash [NAME]", "Start a bash session on primary host (or specific host set by --hosts)"
|
||||||
def bash(name)
|
def bash(name)
|
||||||
|
|||||||
Reference in New Issue
Block a user