diff options
author | elijah <elijah@riseup.net> | 2014-06-04 14:44:00 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-06-04 14:44:00 -0700 |
commit | dde0c4c9b9444107ac2c991c4c43155d50bc99c0 (patch) | |
tree | 155a2d6a20243c55695663035aabd335d7822e91 /lib | |
parent | 516344809dc46186c880efe8ce7ea8ba8dd33587 (diff) | |
download | leap_cli-dde0c4c9b9444107ac2c991c4c43155d50bc99c0.tar.gz leap_cli-dde0c4c9b9444107ac2c991c4c43155d50bc99c0.tar.bz2 |
ensure facts.json is keyed by node name and not hostname
Diffstat (limited to 'lib')
-rw-r--r-- | lib/leap_cli/commands/facts.rb | 7 |
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? |