Default to using bento boxes for vagrant hypervisor#449
Default to using bento boxes for vagrant hypervisor#449silug wants to merge 1 commit intovoxpupuli:masterfrom
Conversation
ekohl
left a comment
There was a problem hiding this comment.
I think a more generic ostype_to_box method is better. I think it's something like
def ostype_to_box(ostype)
case ostype
when /^almalinux(\d+)/
ostype.sub(/(\d)/, '/\1')
when /^centos(\d+)/
version = Regexp.last_match(1)
if version.to_i >= 8
"centos/stream#{version}"
else
"centos/#{version}"
end
when /^debian(\d+)/
version = Regexp.last_match(1)
if (codename = DEBIAN_VERSION_CODES[version])
"debian/#{codename}64"
else
nil
end
when /^fedora/
ostype.sub(/(\d)/, '/\1') + '-cloud-base'
when /ubuntu(\d\d)(\d\d)/
version = "#{Regexp.last_match(1)}.#{Regexp.last_match(2)}"
"bento/ubuntu-#{version}"
when /^([a-z]+)(\d+)$/
os_name = Regexp.last_match(1)
version = Regexp.last_match(2)
bento_os_name = OSTYPE_TO_BENTO_OS_NAME.fetch(os_name, os_name)
"bento/#{bento_os_name}-#{version}"
else
# Fallback to generic if pattern doesn't match
"generic/#{ostype}"
end
end
ekohl
left a comment
There was a problem hiding this comment.
Approving is a bit like approving my own work.
Replace the default `generic` boxes with equivalent `bento` boxes for the vagrant hypervisor. Fixes voxpupuli#447
|
@silug did you do some testing in one of our modules? do the images bring the same packages we rely on/assume? |
@bastelfreak I have not. Even if everything is there, I won't be shocked if there is some breakage given that the What would be the best way to test this out? Look for modules that use vagrant in GHA and open throw-away PRs that use this branch of the gem? (Even if vagrant works locally, I worry that there will be something that makes it blow up on the GHA runners.) |
|
I'm going to close this PR. The |
Replace the default
genericboxes with equivalentbentoboxes for the vagrant hypervisor.Fixes #447