https://github.com/tkuchiki/ohai-plugin-amazon-provided-dns
Ohai plugin to get the AmazonProvidedDNS IP address from the EC2 meta-data
https://github.com/tkuchiki/ohai-plugin-amazon-provided-dns
amazonprovideddns chef ohai plugin
Last synced: 2 months ago
JSON representation
Ohai plugin to get the AmazonProvidedDNS IP address from the EC2 meta-data
- Host: GitHub
- URL: https://github.com/tkuchiki/ohai-plugin-amazon-provided-dns
- Owner: tkuchiki
- License: mit
- Created: 2018-11-01T03:33:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-01T04:22:14.000Z (over 6 years ago)
- Last Synced: 2025-01-25T09:11:07.025Z (4 months ago)
- Topics: amazonprovideddns, chef, ohai, plugin
- Language: Ruby
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ohai-plugin-amazon-provided-dns
Ohai plugin to get the AmazonProvidedDNS IP address from the EC2 meta-data
# Usage
## ohai command
```console
# 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"
}
```## chef
```ruby
# (client|solo).rb
Ohai::Config[:plugin_path] << '/path/to/plugins'
``````ruby
# in cookbook
node[:amazon_provided_dns][:ip]
node[:amazon_provided_dns][:vpc_ip]
```