mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
(FIXUP) Collect hostnames in array before outputting
This commit is contained in:
parent
57e7542f73
commit
dee735e017
1 changed files with 5 additions and 1 deletions
|
|
@ -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'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue