mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
Support centos flavors of redhat
This commit is contained in:
parent
d87d421586
commit
d500daea03
2 changed files with 11 additions and 5 deletions
|
|
@ -10,9 +10,15 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
# Detect various flavors we care about
|
||||
if output =~ /(CentOS|Red Hat Enterprise|Scientific|Cloud|Virtuozzo)\s*Linux( .+)? release 7/i
|
||||
if output =~ /(CentOS)( .+)? 7/i
|
||||
return :centos_7
|
||||
elsif output =~ /(CentOS)( .+)? 8/i
|
||||
return :centos_8
|
||||
elsif output =~ /(CentOS)( .+)?/i
|
||||
return :centos
|
||||
elsif output =~ /(Red Hat Enterprise|Scientific|Cloud|Virtuozzo)\s*Linux( .+)? release 7/i
|
||||
return :rhel_7
|
||||
elsif output =~ /(CentOS|Red Hat Enterprise|Scientific|Cloud|Virtuozzo)\s*Linux( .+)? release 8/i
|
||||
elsif output =~ /(Red Hat Enterprise|Scientific|Cloud|Virtuozzo)\s*Linux( .+)? release 8/i
|
||||
return :rhel_8
|
||||
else
|
||||
return :rhel
|
||||
|
|
|
|||
|
|
@ -22,15 +22,15 @@ describe "VagrantPlugins::GuestRedHat::Cap::Flavor" do
|
|||
let(:cap) { caps.get(:flavor) }
|
||||
|
||||
{
|
||||
"CentOS Linux 2.4 release 7" => :rhel_7,
|
||||
"CentOS Linux 2.4 release 7" => :centos_7,
|
||||
"Red Hat Enterprise Linux release 7" => :rhel_7,
|
||||
"Scientific Linux release 7" => :rhel_7,
|
||||
"CloudLinux release 7.2 (Valeri Kubasov)" => :rhel_7,
|
||||
|
||||
"CentOS Linux release 8.1.1911 (Core)" => :rhel_8,
|
||||
"CentOS Linux release 8.1.1911 (Core)" => :centos_8,
|
||||
"Red Hat Enterprise Linux release 8" => :rhel_8,
|
||||
|
||||
"CentOS" => :rhel,
|
||||
"CentOS" => :centos,
|
||||
"RHEL 6" => :rhel,
|
||||
"banana" => :rhel,
|
||||
}.each do |str, expected|
|
||||
|
|
|
|||
Loading…
Reference in a new issue