lib/beaker-hostgenerator/hypervisor/abs.rb in beaker-hostgenerator-2.2.2 vs lib/beaker-hostgenerator/hypervisor/abs.rb in beaker-hostgenerator-2.2.3
- old
+ new
@@ -21,24 +21,25 @@
# so we're not worried about one overriding the other when we merge
# the hashes together.
base_config = base_generate_node(node_info, base_config, bhg_version, :vmpooler, :abs)
case node_info['ostype']
- when /^(almalinux|centos|redhat|rocky)/
+ when /^(almalinux|centos|oracle|redhat|rocky|scientific)/
base_config['template'] ||= base_config['platform'].gsub(/^el/, ::Regexp.last_match(1))
- when /^fedora/
+ when /^fedora/, /^opensuse/, /^panos/
base_config['template'] ||= base_config['platform']
- when /^ubuntu/
- base_template = node_info['ostype'].sub('ubuntu', 'ubuntu-')
+ when /^(debian|ubuntu)/
+ os = Regexp.last_match(1)
+ base_template = node_info['ostype'].sub(os, "#{os}-")
arch = case node_info['bits']
when '64'
'x86_64'
when '32'
'i386'
when 'AARCH64'
'arm64'
when 'POWER'
- base_template.sub!(/ubuntu-(\d\d)/, 'ubuntu-\1.')
+ base_template.sub!(/#{os}-(\d\d)/, "#{os}-\1.")
'power8'
else
raise "Unknown bits '#{node_info['bits']}' for '#{node_info['ostype']}'"
end
base_config['template'] ||= "#{base_template}-#{arch}"