Skip to content

Commit

Permalink
Add node private & public ips to gce groups (ansible#12539)
Browse files Browse the repository at this point in the history
  • Loading branch information
dohoangkhiem authored and calfonso committed Aug 9, 2017
1 parent 756b510 commit 3b12a85
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contrib/inventory/gce.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b12a85

Please sign in to comment.