Method: Beaker::DSL::InstallUtils#install_puppetlabs_release_repo

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

#install_puppetlabs_release_repo(host) ⇒ Object

Note:

This method only works on redhat-like and debian-like hosts.

Install official puppetlabs release repository configuration on host.

Parameters:

  • host (Host)

    An object implementing Hosts‘s interface.



1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
# File 'lib/beaker/dsl/install_utils.rb', line 1098

def install_puppetlabs_release_repo ( host )
  variant, version, arch, codename = host['platform'].to_array

  case variant
  when /^(fedora|el|centos)$/
    variant = (($1 == 'centos') ? 'el' : $1)

    rpm = options[:release_yum_repo_url] +
      "/puppetlabs-release-%s-%s.noarch.rpm" % [variant, version]

    on host, "rpm -ivh #{rpm}"

  when /^(debian|ubuntu|cumulus)$/
    deb = URI.join(options[:release_apt_repo_url],  "puppetlabs-release-%s.deb" % codename)

    on host, "wget -O /tmp/puppet.deb #{deb}"
    on host, "dpkg -i --force-all /tmp/puppet.deb"
    on host, "apt-get update"
  else
    raise "No repository installation step for #{variant} yet..."
  end
end