lib/beaker/dsl/install_utils/foss_utils.rb
# Installs Puppet Agent and dependencies from msi on provided host(s).
#
# @param [Host, Array<Host>, String, Symbol] hosts    One or more hosts to act upon,
#                            or a role (String or Symbol) that identifies one or more hosts.
# @param [Hash{Symbol=>String}] opts An options hash
# @option opts [String] :puppet_agent_version The version of Puppet Agent to install
# @option opts [String] :win_download_url The url to download puppet from
#
# @note on windows, the +:ruby_arch+ host parameter can determine in addition
# to other settings whether the 32 or 64bit install is used
Installs Puppet Agent and dependencies from msi on provided host(s).
Installs Puppet Agent and dependencies from msi on provided host ( s ) .
def install_puppet_agent_from_msi_on(hosts, opts)
          block_on hosts do |host|
            add_role(host, 'aio') 
            is_config_32 = true == (host['ruby_arch'] == 'x86') || host['install_32'] || opts['install_32']
            should_install_64bit = host.is_x86_64? && !is_config_32
            arch = should_install_64bit ? 'x64' : 'x86'
            if opts[:puppet_agent_version]
              host['dist'] = "puppet-agent-#{opts[:puppet_agent_version]}-#{arch}"
            else
              host['dist'] = "puppet-agent-#{arch}-latest"
            end
            install_a_puppet_msi_on(host, opts)
          end
        end
def install_puppet_agent_from_msi_on ( hosts , opts ) block_on hosts do | host | add_role ( host , 'aio' ) is_config_32 = true == ( host [ 'ruby_arch' ] == 'x86' ) || host [ 'install_32' ] || opts [ 'install_32' ] should_install_64bit = host . is_x86_64? && ! is_config_32 arch = should_install_64bit ? 'x64' : 'x86' if opts [ :puppet_agent_version ] host [ 'dist' ] = "puppet-agent-#{opts[:puppet_agent_version]}-#{arch}" else host [ 'dist' ] = "puppet-agent-#{arch}-latest" end install_a_puppet_msi_on ( host , opts ) end end
Installs Puppet Agent and dependencies from msi on provided host(s).
Installs Puppet Agent and dependencies from msi on provided host ( s ) .
#we are installing agent, so we want aio role # If we don't specify a version install the latest MSI for puppet-agent
hosts
<not_specific>
opts
:win_download_url The url to download puppet from
: win_download_url The url to download puppet from
<not_specific>
opts An options hash
opts An options hash
note
on windows, the +:ruby_arch+ host parameter can determine in addition to other settings whether the 32 or 64bit install is used
on windows the + : ruby_arch + host parameter can determine in addition to other settings whether the 32 or 64bit install is used