Module Facter::Util::EC2
In: lib/facter/util/ec2.rb

Provide a set of utility static methods that help with resolving the EC2 fact.

Methods

Public Class methods

Test if we can connect to the EC2 api. Return true if able to connect. On failure this function fails silently and returns false.

The wait_sec parameter provides you with an adjustable timeout.

Test if the host has an arp entry in its cache that matches the EC2 arp, which is normally +fe:ff:ff:ff:ff:ff+.

Test if this host has a mac address used by Eucalyptus clouds, which normally is +d0:0d+.

Test if this host has a mac address used by OpenStack, which normally starts with FA:16:3E (older versions of OpenStack may generate mac addresses starting with 02:16:3E)

userdata returns a single string containing the body of the response of the GET request for the URI 169.254.169.254/latest/user-data/ If the metadata server responds with a 404 Not Found error code then this method retuns `nil`.

@param version [String] containing the API version for the request. Defaults to "latest" and other examples are documented at aws.amazon.com/archives/Amazon%20EC2

@api public

@return [String] containing the response body or `nil`

[Validate]