I would like to get public ip of a host defined in inventory file
[test-sites:children]
test-site-1
[test-site-1]
test-site-1-2 ipv4=192.168.0.1 ipv6=....
How do I get the ipv4 and ipv6 address of "test-site-1-2" defined in the inventory file? I have checked this answer but it gives all of the addresses (public & private). I am interested in ips defined in the inventory file only.