diff options
author | elijah <elijah@riseup.net> | 2014-04-04 14:18:45 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-04-04 14:18:45 -0700 |
commit | f3b405f62b06551bb0e62e5594259bb6be8516f9 (patch) | |
tree | 8dc612df0420878303040367890b1d170aa26612 | |
parent | 9c30dcfc064bbf62f235282e621708a542e37cfb (diff) | |
download | leap_cli-f3b405f62b06551bb0e62e5594259bb6be8516f9.tar.gz leap_cli-f3b405f62b06551bb0e62e5594259bb6be8516f9.tar.bz2 |
yasf: yet another ssh fix. should make `leap deploy` work better with ~/.ssh/config per-domain settings.
-rw-r--r-- | lib/leap_cli/config/manager.rb | 5 | ||||
-rw-r--r-- | lib/leap_cli/util/remote_command.rb | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb index b610d3b..5076b63 100644 --- a/lib/leap_cli/config/manager.rb +++ b/lib/leap_cli/config/manager.rb @@ -204,6 +204,11 @@ module LeapCli # returns a single Config::Object that corresponds to a Node. # def node(name) + if name =~ /\./ + # probably got a fqdn, since periods are not allowed in node names. + # so, take the part before the first period as the node name + name = name.split('.').first + end @nodes[name] end diff --git a/lib/leap_cli/util/remote_command.rb b/lib/leap_cli/util/remote_command.rb index 847b056..07db416 100644 --- a/lib/leap_cli/util/remote_command.rb +++ b/lib/leap_cli/util/remote_command.rb @@ -31,7 +31,7 @@ module LeapCli; module Util; module RemoteCommand end node_list.each do |name, node| - cap.server node.name, :dummy_arg, node_options(node, options[:ssh_options]) + cap.server node.domain.full, :dummy_arg, node_options(node, options[:ssh_options]) end yield cap @@ -50,7 +50,8 @@ module LeapCli; module Util; module RemoteCommand # def ssh_options { - :config => false, + :config => false, # setting config to `false` is odd. however, if we don't do this, net:ssh doesn't use ssh-agent correctly, + # for some unknown reason. also, with config `false`, it seems to still use ~/.ssh/config, so go figure. :global_known_hosts_file => path(:known_hosts), :user_known_hosts_file => '/dev/null', :paranoid => true |