diff --git a/contrib/inventory/gce.py b/contrib/inventory/gce.py index 076e69c5adaedb..a73c8b7d02313e 100755 --- a/contrib/inventory/gce.py +++ b/contrib/inventory/gce.py @@ -477,6 +477,13 @@ def group_instances(self, zones=None): else: groups[stat] = [name] + for private_ip in node.private_ips: + groups[private_ip] = [name] + + if len(node.public_ips) >= 1: + for public_ip in node.public_ips: + groups[public_ip] = [name] + groups["_meta"] = meta return groups