Method: Beaker::DSL::InstallUtils#install_packages_from_local_dev_repo

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

#install_packages_from_local_dev_repo(host, package_name) ⇒ Object

Note:

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

Note:

This method is paired to be run directly after #install_puppetlabs_dev_repo

Installs packages from the local development repository on the given host



1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
# File 'lib/beaker/dsl/install_utils.rb', line 1245

def install_packages_from_local_dev_repo( host, package_name )
  if host['platform'] =~ /debian|ubuntu|cumulus/
    find_filename = '*.deb'
    find_command  = 'dpkg -i'
  elsif host['platform'] =~ /fedora|el|centos/
    find_filename = '*.rpm'
    find_command  = 'rpm -ivh'
  else
    raise "No repository installation step for #{host['platform']} yet..."
  end
  find_command = "find /root/#{package_name} -type f -name '#{find_filename}' -exec #{find_command} {} \\;"
  on host, find_command
end