(FIXUP) Collect hostnames in array before outputting

This commit is contained in:
Jesse Scott 2020-08-24 16:22:03 -07:00
parent 57e7542f73
commit dee735e017
No known key found for this signature in database
GPG key ID: 285826E26E0AAD93

View file

@ -87,9 +87,13 @@ class Utils
def self.print_fqdn_for_host(service, hostname, host_data) def self.print_fqdn_for_host(service, hostname, host_data)
case service.type case service.type
when 'ABS' when 'ABS'
abs_hostnames = []
host_data['allocated_resources'].each do |vm_name, _i| host_data['allocated_resources'].each do |vm_name, _i|
puts vm_name['hostname'] abs_hostnames << vm_name['hostname']
end end
puts abs_hostnames.join("\n")
when 'Pooler' when 'Pooler'
puts "#{hostname}.#{host_data['domain']}" puts "#{hostname}.#{host_data['domain']}"
when 'NonstandardPooler' when 'NonstandardPooler'