Skip to content
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 request] Add git repository as inventory type #902

Open
ziouf opened this issue Mar 31, 2022 · 7 comments
Open

[feature request] Add git repository as inventory type #902

ziouf opened this issue Mar 31, 2022 · 7 comments
Assignees

Comments

@ziouf
Copy link
Contributor

ziouf commented Mar 31, 2022

This may allow to manage source code of dynamic inventory scripts

This feature would require to set spécific fields in the UI :

  • git repository (choice among project's repositories)
  • file path (free text to set the path of the inventory file from git repository root)

Every job using this inventory will trigger git pull as first runtime step.

Does it make sens for you ?
Thank you

@ziouf
Copy link
Contributor Author

ziouf commented Mar 31, 2022

Another need, which is linked to this one would be:

  • allow usage of dynamic inventory scripts

I tryied to setup python script as "file" type, but it's not invoked and produces the following error :

3:52:21 PM [WARNING]: Unable to parse /tmp/dynamic-inventory.py as an inventory source
3:52:21 PM [WARNING]: No inventory was parsed, only implicit localhost is available
3:52:21 PM [WARNING]: provided hosts list is empty, only localhost is available. Note that
3:52:21 PM the implicit localhost does not match 'all'

But locally this invocation works

ansible all -i dynamic-inventory.py -m ping

@zorrobiwan
Copy link

+1

@Alethio36
Copy link

Alethio36 commented Jun 20, 2023

i hate to bump this, but is there any response on when/if this can become a reality?

*edit: typo

@nobilisgkill4
Copy link

+1

In addition: This would also make sense to have the option for "enviroment" as well due to the fact that both parts are traditionaly part on an ansible project.

@zorrobiwan
Copy link

Already possible in a certain way : #1071

@pwannenmacher
Copy link

Will there be an option to select a Git repo as an investoy in the UI in the near future?

@geelenbert
Copy link

+1

would realy like the github inventory feature

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

No branches or pull requests

7 participants