google.cloud icon indicating copy to clipboard operation
google.cloud copied to clipboard

inventory plugin: adding the instance hostname field as inventory hostname

Open DeLoWaN opened this issue 3 years ago • 0 comments

SUMMARY

inventory plugin: adding the instance hostname field as inventory hostname

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

inventory_plugin

ADDITIONAL INFORMATION

I think it would be a great addition. In my setup I use the hostname field of the instance which allows me to use a full FQDN. I cannot use as-is the FQDN in the name field since it does not allow dots ".".

I tested my modification in my own repo, and it works. But I am concerned about how to handle the fact that the hostname field might be absent (it is not mandatory on GCP). I fallbacked on the name field.

I wanted to discuss it before sending a PR.

What do you think ?

DeLoWaN avatar Jun 24 '21 17:06 DeLoWaN