Skip to content

Conversation

@Yonas-Dresen
Copy link
Contributor

SUMMARY

Check if labels are present in the json file. If no labels are present, do not set name. This will cause the inventory to continue parsing and setting the next available hostname from the ordered list.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

gcp_compute

ADDITIONAL INFORMATION
hostnames:
- labels.name
- private_ip

If a vm has no labels attached it will now use the private ip

Tested behavior after change:

  • Ensure label.name is set when present
  • Ensure inventory continues parsing when labels are not available
  • Ensure inventory continues parsing when labels are available, but the requested labels is not present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants