This migrates the CentOS guest plugin to identify machines by what is in os-release rather than based on if the /etc/centos-release file exists. It just so happens that the Rocky Linux plugin is set up to inherit directly from :redhat (not :centos) and thus the CentOS flavor is attempted before Rocky in the depth first search. For some reason the rockylinux/8 vagrant box still has the /etc/centos-release file in it even though it's only supposed to inherit from RHEL. The almalinux/9 box does not have /etc/centos-release.
12 lines
249 B
Ruby
12 lines
249 B
Ruby
require "vagrant"
|
|
require_relative '../linux/guest'
|
|
|
|
module VagrantPlugins
|
|
module GuestCentos
|
|
class Guest < VagrantPlugins::GuestLinux::Guest
|
|
# Name used for guest detection
|
|
GUEST_DETECTION_NAME = "centos".freeze
|
|
end
|
|
end
|
|
end
|