diff --git a/lib/vmfloaty/format.rb b/lib/vmfloaty/format.rb index 42ec5c2..fb263a4 100644 --- a/lib/vmfloaty/format.rb +++ b/lib/vmfloaty/format.rb @@ -7,7 +7,11 @@ class Format hostname_hash.delete("ok") hostname_hash.each do |type, hosts| - host_hash[type] = hosts["hostname"] + if type == "domain" + host_hash[type] = hosts + else + host_hash[type] = hosts["hostname"] + end end puts host_hash.to_json