New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve gcp_compute plugin parameters documentation #47573
Comments
Hi @walterdolce, thank you for submitting this issue! |
Files identified in the description: If these files are inaccurate, please update the |
Is the documentation provided at https://docs.ansible.com/ansible/latest/plugins/inventory/gcp_compute.html insufficient to answer your questions? needs_info |
Unfortunately yes, it's insufficient. For example, I don't know how add hosts to group based on Jinja2 conditionals for the |
Is there a reason we cannot keep both discussion in a single issue? I believe that answering your question in this issue, would also answer your question in #47574 |
However, there is documentation that applies to all inventory plugins, that should explain how to use
|
Hmm I didn't come across this page before. Thanks @sivel.
How do I add all hosts to the group |
Would it make sense to add a link to this page on the Something like "for more info and examples on how to use Happy to send a PR for this |
I believe like the following:
I'll defer this question to our docs team. cc @acozine |
@walterdolce yes, a PR adding links to the gce_compute plugin docs would be very welcome! |
@walterdolce take a look at https://docs.ansible.com/ansible/devel/community/documentation_contributions.html#community-documentation-contributions for some pointers on updating documentation, and feel free to join the #ansible-docs channel on Freenode IRC if you get stuck or have questions. |
Thanks @sivel. That seemed to have worked. But now it seems that my GCP project-specific Inventory file:
During the play, I get the following:
|
Never mind. Moving the vars in the relevant I consider my issue as solved for now, but I will leave this open until I manage to send the PR for the documentation update if you don't mind. |
@walterdolce Did you try "composing" like this :
=> Without double-quote & single quotes, Ansible dynamic inventory resolves values as jinja variables, not string |
Hi @jeanfabrice, no I did not. It would be fairly confusing if I had to resort to that kind of workaround. As an Ansible user, I would expect to either use |
Hi all. Quick update regarding the documentation issue. I have by chance discovered that if you have a group name containing a dash ( I haven't seen this documented anywhere. Please correct me if I'm wrong. Thanks! |
Files identified in the description: If these files are incorrect, please update the |
!component=lib/ansible/plugins/inventory/gcp_compute.py |
Files identified in the description: If these files are incorrect, please update the |
Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.
For further information, please see: |
SUMMARY
The gcp_compute inventory plugin has a less-than-ideal documentation, I would say. None of the non-trivial parameters are documented and I could not find any documentation or example usages around showing how one would want/have to use them.
By "them" here I refer to parameters like
groups
,keyed_groups
, etc.I think the lack of documentation might get in the way of adopting the tool.
ISSUE TYPE
COMPONENT NAME
gcp_compute
ANSIBLE VERSION
The latest at this time of writing
CONFIGURATION
N/A
OS / ENVIRONMENT
N/A
ADDITIONAL INFORMATION
It would be nice if you would add comprehensive documentation to everything you do. Perhaps add "document this thing and show how to use it" as the definition of done?
Thank you.
The text was updated successfully, but these errors were encountered: