-
Notifications
You must be signed in to change notification settings - Fork 108
Feature inv/lookup #886
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
Feature inv/lookup #886
Conversation
@gebz97 hello, thanks for the PR I see issues that need to be solved, but let's not review the code and first discuss whether we need the plugins as it's big chunks of code that need to be maintained. I wouldn't expand the collection unless proposed features would be really helpful for a broad audience. As I'm not a user, @andreasscherbaum @hunleyd @toydarian and others, please share your thoughts. |
Full disclosure: I haven't looked at the code yet.
I can definitely see how this would be useful. But I don't know about the broader audience. Maybe @gebz97 can shine some light on that? |
First of all, I suggest you submit both modules as separate PRs. That makes reviewing and testing a lot easier. Like others, I'd like to see a few real-world use cases for both modules. Once this is merged, it must be maintained and that requires constant updates. If you are the only user then this depends on you. Regards tests: The list of hosts and groups in the tests is ... sparse. This needs a lot more variations both in hosts and groups. And tests. A password for database access is not always necessary, pg_hba.conf can allow access based on other rules, like IP address. For the inventory plugin: I would NOT depend on a provided SQL query at all, but pre-define table and column names. Makes it much easier. For the inventory plugin: While writing this review I was thinking hard how I could possibly use these two plugins. |
|
Not sure exactly why is this a problem. Can't 2 playbooks have separate inventories? So you could have a static inventory for setting up the PostgreSQL and then, for the rest of the playbooks, rely on the PostgreSQL-based one? |
Yes, you can. This falls into the wider question about use cases which was not only raised by me. |
Hello everyone, Thanks for the feedback, I really appreciate it. I will close this PR for now, but will definitely discuss all the points raised in the comments first on the matrix channel, and will proceed with creating separate PRs for each feature along with the justification/use cases. If someone is interested in sharing insights on the design of the plugins I would appreciate it, as this is a first time for me. |
Great discussion, folks, thanks! Here's a link to the forum post https://forum.ansible.com/t/plugin-idea-postgresql-inventory/44621/3 My 2c (writing this being heavily underslept. sorry if there's confusion):
|
SUMMARY
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
The purpose of the plugins are pretty straight forward, I am unsure however if it is a must for me to include integration tests for the lookup plugin (I did include 26 unit tests for the inventory plugin).
(this is my first contribution to this project, so please be patient with me :) )