Question

How to obtain the IPv6 address of a droplet?

Posted April 9, 2017 2.2k views
API IPv6 Ansible Ubuntu 16.04

After spawning a new droplet on DO with Ansible, it’s trivially easy to get the IPv4 address, however I can’t find an easy way to do the same to get the public IPv6 address.

Is there a way to do that?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers

Found it:

"{{ my_droplet.droplet.networks.v6[0].ip_address }}"
Submit an Answer