I am currently running my playbooks using
# ansible-playbook -i myscript.py myplaybook.yaml
where myscript.py
generates the appropriate host information (in the documentation ) and myplaybook.py
starts with
This works great.
Now i would like
- get inventory via web service: include a web service call in the playback program and get inventory in the appropriate format, regardless of whether it is (I manage the web service).
- and also use this inventory directly in the playbook without the
-i
option, having the host: all
directive, understand that it should use it.
Is this something possible out of reach? I get the impression that inventory is needed at the beginning of playback (= that it cannot be created in the textbook)
source share