Skip to content

Commit

Permalink
Merge pull request #228 from GabrielNagy/rocky-alma-abs-support
Browse files Browse the repository at this point in the history
Add ABS support for Rocky and Alma 8
  • Loading branch information
GabrielNagy authored Sep 22, 2021
2 parents 0f673dd + d9126a4 commit 2805f8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/beaker-hostgenerator/hypervisor/abs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ def generate_node(node_info, base_config, bhg_version)
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']
Expand All @@ -37,12 +37,12 @@ def generate_node(node_info, base_config, bhg_version)
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
Expand Down

0 comments on commit 2805f8e

Please sign in to comment.