Ohai plugin to get the AmazonProvidedDNS IP address from the EC2 meta-data
# VPC CIDR = 10.0.0.0/16
$ ohai -d /path/to/plugin/dir/ | jq .amazon_provided_dns
{
"ip": "169.254.169.253",
"vpc_ip": "10.0.0.2"
}
# (client|solo).rb
Ohai::Config[:plugin_path] << '/path/to/plugins'
# in cookbook
node[:amazon_provided_dns][:ip]
node[:amazon_provided_dns][:vpc_ip]