Sha256: b3a67d48355d8672aa0db47c10ff31e14dc9d718fa9e9ab71c14ff120e7e3a71

Contents?: true

Size: 292 Bytes

Versions: 5

Compression:

Stored size: 292 Bytes

Contents

require 'net/ssh'

module AmiSpec
  class WaitForCloudInit
    def self.wait(ip_address, user, key, port=22)
      Net::SSH.start(ip_address, user, keys: [key], :verify_host_key => :never, port: port) do |ssh|
        ssh.exec! '/usr/bin/cloud-init status --wait'
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ami_spec-1.8.2 lib/ami_spec/wait_for_cloud_init.rb
ami_spec-1.8.1 lib/ami_spec/wait_for_cloud_init.rb
ami_spec-1.8.0 lib/ami_spec/wait_for_cloud_init.rb
ami_spec-1.7.0 lib/ami_spec/wait_for_cloud_init.rb
ami_spec-1.6.0 lib/ami_spec/wait_for_cloud_init.rb