summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/commands')
-rw-r--r--lib/leap_cli/commands/facts.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/leap_cli/commands/facts.rb b/lib/leap_cli/commands/facts.rb
index 3653c46..43a04df 100644
--- a/lib/leap_cli/commands/facts.rb
+++ b/lib/leap_cli/commands/facts.rb
@@ -83,7 +83,12 @@ module LeapCli; module Commands
new_facts = {}
ssh_connect(nodes) do |ssh|
ssh.leap.run_with_progress(facter_cmd) do |response|
- new_facts[response[:host]] = response[:data].strip
+ node = manager.node(response[:host])
+ if node
+ new_facts[node.name] = response[:data].strip
+ else
+ log :warning, 'Could not find node for hostname %s' % response[:host]
+ end
end
end
overwrite_existing = args.empty?