lib/gogetit/util.rb in gogetit-0.7.0 vs lib/gogetit/util.rb in gogetit-0.8.0

- old
+ new

@@ -139,19 +139,19 @@ else thing end end - def wait_until_available(ip_or_fqdn, logger) + def wait_until_available(ip_or_fqdn, distro_name, logger) logger.info("Calling <#{__method__.to_s}>") until ping_available?(ip_or_fqdn, logger) logger.info("Calling <#{__method__.to_s}> for ping to be ready..") sleep 3 end logger.info("#{ip_or_fqdn} is now available to ping..") - until ssh_available?(ip_or_fqdn, 'ubuntu', logger) + until ssh_available?(ip_or_fqdn, distro_name, logger) logger.info("Calling <#{__method__.to_s}> for ssh to be ready..") sleep 3 end logger.info("#{ip_or_fqdn} is now available to ssh..") end @@ -183,12 +183,12 @@ abort("one of #{addresses.join(', ')} is already being used.") \ unless ifaces return ifaces end - def run_through_ssh(host, commands, logger) + def run_through_ssh(host, distro_name, commands, logger) logger.info("Calling <#{__method__.to_s}>") - Net::SSH.start(host, 'ubuntu') do |ssh| + Net::SSH.start(host, distro_name) do |ssh| commands.each do |cmd| logger.info("'#{cmd}' is being executed..") output = ssh.exec!(cmd) puts output if output != '' end