From 9d53e8ccab77c319ec9e9276ea52948f6ccbae09 Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 25 Mar 2020 10:36:02 -0400 Subject: [PATCH] Recognize rhel8 flavor --- plugins/guests/redhat/cap/flavor.rb | 2 ++ test/unit/plugins/guests/redhat/cap/flavor_test.rb | 3 +++ 2 files changed, 5 insertions(+) diff --git a/plugins/guests/redhat/cap/flavor.rb b/plugins/guests/redhat/cap/flavor.rb index 32dc1a7c2..544af5412 100644 --- a/plugins/guests/redhat/cap/flavor.rb +++ b/plugins/guests/redhat/cap/flavor.rb @@ -12,6 +12,8 @@ module VagrantPlugins # Detect various flavors we care about if output =~ /(CentOS|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 + return :rhel_8 else return :rhel end diff --git a/test/unit/plugins/guests/redhat/cap/flavor_test.rb b/test/unit/plugins/guests/redhat/cap/flavor_test.rb index c711495fa..df890783f 100644 --- a/test/unit/plugins/guests/redhat/cap/flavor_test.rb +++ b/test/unit/plugins/guests/redhat/cap/flavor_test.rb @@ -27,6 +27,9 @@ describe "VagrantPlugins::GuestRedHat::Cap::Flavor" do "Scientific Linux release 7" => :rhel_7, "CloudLinux release 7.2 (Valeri Kubasov)" => :rhel_7, + "CentOS Linux release 8.1.1911 (Core)" => :rhel_8, + "Red Hat Enterprise Linux release 8" => :rhel_8, + "CentOS" => :rhel, "RHEL 6" => :rhel, "banana" => :rhel,