Method: Beaker::CLI#combined_instance_and_options_hosts

Defined in:
lib/beaker/cli.rb

#combined_instance_and_options_hostsObject

Return a host_hash that is a merging of options host hashes with instance host objects

Returns:

  • Hash



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/beaker/cli.rb', line 239

def combined_instance_and_options_hosts
  hosts_yaml = @options
  newly_keyed_hosts_entries = {}
  hosts_yaml['HOSTS'].each do |host_name, file_host_hash|
    h = Beaker::Options::OptionsHash.new
    file_host_hash = h.merge(file_host_hash)
    @hosts.each do |host|
      if host_name.to_s == host.name.to_s
        newly_keyed_hosts_entries[host.hostname] = file_host_hash.merge(host.host_hash)
        break
      end
    end
  end
 newly_keyed_hosts_entries
end