On 01.02.2019 21:13, Subhi Andrews wrote:
> Thank you, Kai. Will check it out.
>
> So if we can write a script that generates inventory in json format, we
> can
> directly pass the script to the ansible-playbook command? Did I
> understand
> that correctly?
That is correct, if a inventory file doesn't have the execution bit set
Ansible will read the content, if the execution bit is set Ansible will
run the file.
The script need to return json and the format is described here together
with how to develop a plugin
https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html
--
Kai Stian Olstad