mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add node private & public ips to gce groups (#12539)
This commit is contained in:
parent
756b510414
commit
3b12a85750
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue