diff --git a/lib/leap_cli/commands/facts.rb b/lib/leap_cli/commands/facts.rb index 6c954ee875887e88cba0f38d75cefb555f0c887b..74ef463deffe77b994d4a9e2b801e928b2c0a91c 100644 --- a/lib/leap_cli/commands/facts.rb +++ b/lib/leap_cli/commands/facts.rb @@ -85,10 +85,10 @@ module LeapCli; module Commands SSH.remote_command(nodes) do |ssh, host| response = ssh.capture(facter_cmd, :log_output => false) if response - log 'done', :host => host - node = manager.node(host) + node = manager.node(host.hostname) if node new_facts[node.name] = response.strip + log 'done', :host => host.to_s else log :warning, 'Could not find node for hostname %s' % host end