Method: Beaker::DSL::InstallUtils#fetch_puppet

Defined in:
lib/beaker/dsl/install_utils.rb

#fetch_puppet(hosts, opts) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Determine the PE package to download/upload per-host, download/upload that package onto the host and unpack it.

Parameters:

  • hosts (Array<Host>)

    The hosts to download/upload and unpack PE onto

  • opts (Hash{Symbol=>Symbol, String})

    The options

Options Hash (opts):

  • :pe_dir (String)

    Default directory or URL to pull PE package from (Otherwise uses individual hosts pe_dir)

  • :pe_ver (String)

    Default PE version to install or upgrade to (Otherwise uses individual hosts pe_ver)

  • :pe_ver_win (String)

    Default PE version to install or upgrade to on Windows hosts (Otherwise uses individual Windows hosts pe_ver)



417
418
419
420
421
422
423
424
425
426
427
428
429
430
# File 'lib/beaker/dsl/install_utils.rb', line 417

def fetch_puppet(hosts, opts)
  hosts.each do |host|
    # We install Puppet from the master for frictionless installs, so we don't need to *fetch* anything
    next if host['roles'].include?('frictionless') && (! version_is_less(opts[:pe_ver] || host['pe_ver'], '3.2.0'))

    if host['platform'] =~ /windows/
      fetch_puppet_on_windows(host, opts)
    elsif host['platform'] =~ /osx/
      fetch_puppet_on_mac(host, opts)
    else
      fetch_puppet_on_unix(host, opts)
    end
  end
end