Method: Blower::Context#ping

Defined in:
lib/blower/context.rb

#ping(on: hosts, quiet: false) ⇒ Object

Ping each host by trying to connect to port 22

Parameters:

  • on (Array) (defaults to: hosts)

    The hosts to operate on. Defaults to the context’s current host list.

  • quiet (Boolean) (defaults to: false)

    Whether to suppress log messages.



244
245
246
247
248
249
250
# File 'lib/blower/context.rb', line 244

def ping (on: hosts, quiet: false)
  log.info "ping", quiet: quiet do
    hash_map(hosts) do |host|
      host.ping
    end
  end
end