libraries/ec2.rb
# fetch the instance ID from the metadata endpoint
fetch the instance ID from the metadata endpoint
fetch the instance ID from the metadata endpoint
def query_instance_id
        instance_id = open('http://169.254.169.254/latest/meta-data/instance-id', options = { proxy: false }, &:gets)
        fail 'Cannot find instance id!' unless instance_id
        Chef::Log.debug("Instance ID is #{instance_id}")
        instance_id
      end
def query_instance_id instance_id = open ( 'http://169.254.169.254/latest/meta-data/instance-id' , options = { proxy : false } , & :gets ) fail 'Cannot find instance id!' unless instance_id Chef :: Log . debug ( "Instance ID is #{instance_id}" ) instance_id end
fetch the instance ID from the metadata endpoint
fetch the instance ID from the metadata endpoint