Sha256: 08e9e72e3615d60706b82b0faaa523153c272fac359bb78661f7f4b3e61b4203
Contents?: true
Size: 1019 Bytes
Versions: 2
Compression:
Stored size: 1019 Bytes
Contents
require 'pe_build/on_machine' class PEBuild::Cap::RunInstall::Windows extend PEBuild::OnMachine # Run the PE installer on Windows systems # # @param machine [Vagrant::Machine] The Vagrant machine on which to run the # installation. # @param installer_dir [String] A path to the PE installer. # @param answers [Hash[String => String}] A hash of options that will be # passed to msiexec as `key=value` pairs. # # @return [void] def self.run_install(machine, installer_path, answers, **options) install_options = answers.map{|e| e.join('=')}.join(' ') # Lots of PowerShell commands can handle UNIX-style paths. msiexec can't. installer_path = installer_path.gsub('/', '\\') cmd = <<-EOS $params = @( "/qn", "/i `"#{installer_path}`"", "/l*v puppet-enterprise-installer.log", "#{install_options}" ) (Start-Process -FilePath "msiexec.exe" -ArgumentList $params -Wait -Passthru).ExitCode EOS machine.ui.info "Running: #{cmd}" on_machine(machine, cmd) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vagrant-pe_build-0.15.1 | lib/pe_build/cap/run_install/windows.rb |
vagrant-pe_build-0.15.0 | lib/pe_build/cap/run_install/windows.rb |