Sha256: 084b6be27852559d19d21e2dfeea2e1cb214e07e2fb4687e33a3985d510dd782

Contents?: true

Size: 1.01 KB

Versions: 2

Compression:

Stored size: 1.01 KB

Contents

module VagrantPlugins
  module Chef
    # Read more about the Omnibus installer here:
    #
    #   https://docs.chef.io/install_omnibus.html
    #
    module Omnibus
      OMNITRUCK = "https://omnitruck.chef.io".freeze

      def sh_command(project, version, channel, options = {})
        command =  "curl -sL #{OMNITRUCK}/install.sh | sudo bash"
        command << " -s -- -P \"#{project}\" -c \"#{channel}\""

        if version != :latest
          command << " -v \"#{version}\""
        end

        if options[:download_path]
          command << " -d \"#{options[:download_path]}\""
        end

        command
      end
      module_function :sh_command

      def ps_command(project, version, channel, options = {})
        command =  ". { iwr -useb #{OMNITRUCK}/install.ps1 } | iex; install"
        command << " -project '#{project}' -channel '#{channel}'"

        if version != :latest
          command << " -version '#{version}'"
        end

        command
      end
      module_function :ps_command
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-unbundled-1.8.1.2 plugins/provisioners/chef/omnibus.rb
vagrant-unbundled-1.8.1.1 plugins/provisioners/chef/omnibus.rb