semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

[feature request] Add git repository as inventory type

Open ziouf opened this issue 3 years ago • 1 comments

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 avatar Mar 31 '22 07:03 ziouf

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

ziouf avatar Mar 31 '22 16:03 ziouf

+1

zorrobiwan avatar Jun 16 '23 15:06 zorrobiwan

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

*edit: typo

Alethio36 avatar Jun 20 '23 04:06 Alethio36

+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.

nobilisgkill4 avatar Aug 24 '23 08:08 nobilisgkill4

Already possible in a certain way : https://github.com/ansible-semaphore/semaphore/discussions/1071

zorrobiwan avatar Oct 10 '23 14:10 zorrobiwan

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

pwannenmacher avatar Mar 29 '24 15:03 pwannenmacher

+1

would realy like the github inventory feature

geelenbert avatar Apr 10 '24 07:04 geelenbert