summaryrefslogtreecommitdiff
path: root/provider_base/lib/macros/hosts.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-11-25 16:25:43 -0800
committerelijah <elijah@riseup.net>2014-11-25 16:25:43 -0800
commit83267a00f272a6f3f52a66eca44d9ca85924cc8e (patch)
tree03cd1f3427de20b800e2c28e0931667d0dcbf8f5 /provider_base/lib/macros/hosts.rb
parentde51b83384d97a67cdbdf1992ba9ad771a292c5d (diff)
include a host information in ssh_config for ever possible host a given node might communicate with. this includes port and host key algorithm. closes #6432
Diffstat (limited to 'provider_base/lib/macros/hosts.rb')
-rw-r--r--provider_base/lib/macros/hosts.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/provider_base/lib/macros/hosts.rb b/provider_base/lib/macros/hosts.rb
index 8a4058a5..8281329f 100644
--- a/provider_base/lib/macros/hosts.rb
+++ b/provider_base/lib/macros/hosts.rb
@@ -42,7 +42,12 @@ module LeapCli
hosts = {}
my_location = @node['location'] ? @node['location']['name'] : nil
nodes.each_node do |node|
- hosts[node.name] = {'ip_address' => node.ip_address, 'domain_internal' => node.domain.internal, 'domain_full' => node.domain.full}
+ hosts[node.name] = {
+ 'ip_address' => node.ip_address,
+ 'domain_internal' => node.domain.internal,
+ 'domain_full' => node.domain.full,
+ 'port' => node.ssh.port
+ }
node_location = node['location'] ? node['location']['name'] : nil
if my_location == node_location
if facts = @node.manager.facts[node.name]