lib/beaker-hostgenerator/hypervisor/abs.rb in beaker-hostgenerator-1.7.0 vs lib/beaker-hostgenerator/hypervisor/abs.rb in beaker-hostgenerator-1.7.1
- old
+ new
@@ -21,29 +21,29 @@
# 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 /^centos/
- base_config['template'] = base_config['platform'].gsub(/^el/, 'centos')
+ when /^(almalinux|centos|redhat|rocky)/
+ base_config['template'] ||= base_config['platform'].gsub(/^el/, $1)
when /^fedora/
- base_config['template'] = base_config['platform']
+ base_config['template'] ||= base_config['platform']
when /^ubuntu/
base_template = node_info['ostype'].sub('ubuntu', 'ubuntu-')
arch = case node_info['bits']
when '64'
'x86_64'
when '32'
'i386'
when 'AARCH64'
'arm64'
when 'POWER'
- base_template = node_info['ostype'].sub(/ubuntu(\d\d)/, 'ubuntu-\1.')
+ base_template.sub!(/ubuntu-(\d\d)/, 'ubuntu-\1.')
'power8'
else
raise "Unknown bits '#{node_info['bits']}' for '#{node_info['ostype']}'"
end
- base_config['template'] = "#{base_template}-#{arch}"
+ base_config['template'] ||= "#{base_template}-#{arch}"
end
base_config
end
end