diff options
Diffstat (limited to 'lib/leap_cli/commands/deploy.rb')
-rw-r--r-- | lib/leap_cli/commands/deploy.rb | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/leap_cli/commands/deploy.rb b/lib/leap_cli/commands/deploy.rb index 29c3faf5..9dd190ab 100644 --- a/lib/leap_cli/commands/deploy.rb +++ b/lib/leap_cli/commands/deploy.rb @@ -87,14 +87,21 @@ module LeapCli long_desc 'The FILTER can be the name of a node, service, or tag.' arg_name 'FILTER' command [:history, :h] do |c| - c.flag :port, :desc => 'Override the default SSH port.', - :arg_name => 'PORT' - c.flag :ip, :desc => 'Override the default SSH IP address.', - :arg_name => 'IPADDRESS' + c.flag :port, :desc => 'Override the default SSH port.', + :arg_name => 'PORT' + c.flag :ip, :desc => 'Override the default SSH IP address.', + :arg_name => 'IPADDRESS' + c.switch :last, :desc => 'Show last deploy only', + :negatable => false c.action do |global,options,args| + if options[:last] == true + lines = 1 + else + lines = 10 + end nodes = manager.filter!(args) ssh_connect(nodes, connect_options(options)) do |ssh| - ssh.leap.history + ssh.leap.history(lines) end end end |