Method: Pkg::Util::Net.check_host_ssh
- Defined in:
- lib/packaging/util/net.rb
.check_host_ssh(hosts) ⇒ Object
Returns an array of hosts where ssh access failed. Empty array if successful.
33 34 35 36 37 38 39 40 41 |
# File 'lib/packaging/util/net.rb', line 33 def check_host_ssh(hosts) errs = [] Array(hosts).flatten.each do |host| remote_execute(host, 'exit', { extra_options: '-oBatchMode=yes' }) rescue StandardError errs << host end return errs end |