diff --git a/plugins/inventory/instance.py b/plugins/inventory/instance.py index 9d579ba..d9b0ba7 100644 --- a/plugins/inventory/instance.py +++ b/plugins/inventory/instance.py @@ -32,6 +32,7 @@ default: v4_default_ip choices: - v4_default_ip + - v4_public_ip - hostname filter_by_zone: description: Only return instances in the provided zone. @@ -97,6 +98,9 @@ name: {{ instance.name }} hostname: {{ instance.hostname or instance.name | lower }} v4_default_ip: {{ instance.nic[0].ipaddress }} + {% if instance.publicip %} + v4_public_ip: {{ instance.publicip }} + {% endif %} zone: {{ instance.zonename }} domain: {{ instance.domain | lower }}