If the the value of ID= is not recognised, identify the OS if it is a derivative of CoreOS https://www.freedesktop.org/software/systemd/man/os-release.html#ID_LIKE=
12 lines
294 B
Ruby
12 lines
294 B
Ruby
require "vagrant"
|
|
|
|
module VagrantPlugins
|
|
module GuestCoreOS
|
|
class Guest < Vagrant.plugin("2", :guest)
|
|
def detect?(machine)
|
|
machine.communicate.test("(cat /etc/os-release | grep ID=coreos) || (cat /etc/os-release | grep -E 'ID_LIKE=.*coreos.*')")
|
|
end
|
|
end
|
|
end
|
|
end
|