mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Add node private & public ips to gce groups (#12539)
This commit is contained in:
committed by
Chris Alfonso
parent
756b510414
commit
3b12a85750
@@ -477,6 +477,13 @@ class GceInventory(object):
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user