Sha256: 32e456855f671a5f9aa400cecafd803b30762b5e0d1d10fef746421f9ae29a60

Contents?: true

Size: 715 Bytes

Versions: 2

Compression:

Stored size: 715 Bytes

Contents

require_relative "../../omnibus"

module VagrantPlugins
  module Chef
    module Cap
      module Redhat
        module ChefInstall
          def self.chef_install(machine, project, version, channel, options = {})
            if dnf?(machine)
              machine.communicate.sudo("dnf install -y -q curl")
            else
              machine.communicate.sudo("yum install -y -q curl")
            end

            command = Omnibus.sh_command(project, version, channel, options)
            machine.communicate.sudo(command)
          end

          protected

          def self.dnf?(machine)
            machine.communicate.test("/usr/bin/which -s dnf")
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-unbundled-1.8.1.2 plugins/provisioners/chef/cap/redhat/chef_install.rb
vagrant-unbundled-1.8.1.1 plugins/provisioners/chef/cap/redhat/chef_install.rb