2020-05-06 15:33:44 -04:00

27 lines
866 B
Ruby

module VagrantPlugins
module PodmanProvisioner
module Cap
module Redhat
module PodmanInstall
def self.podman_install(machine, kubic)
# Official install instructions for podman
# https://podman.io/getting-started/installation.html
case machine.guest.capability("flavor")
when :rhel_7
machine.communicate.tap do |comm|
comm.sudo("subscription-manager repos --enable=rhel-7-server-extras-rpms")
comm.sudo("yum -q -y install podman")
end
when :rhel_8
machine.communicate.tap do |comm|
comm.sudo("yum module enable -y container-tools")
comm.sudo("yum module install -y container-tools")
end
end
end
end
end
end
end
end