Method: Beaker::HostPrebuiltSteps#apt_get_update

Defined in:
lib/beaker/host_prebuilt_steps.rb

#apt_get_update(hosts) ⇒ Object

Run ‘apt-get update’ on the provided host or hosts. If the platform of the provided host is not ubuntu, debian or cumulus: do nothing.

Parameters:

  • hosts (Host, Array<Host>)

    One or more hosts to act upon



199
200
201
202
203
204
205
# File 'lib/beaker/host_prebuilt_steps.rb', line 199

def apt_get_update hosts
  block_on hosts do |host|
    if host[:platform] =~ /ubuntu|debian|cumulus/
      host.exec(Command.new("apt-get update"))
    end
  end
end