Hi
Is there any simple dynamic inventory script that would read from a local file contain list of hostnames only?
Hi
Is there any simple dynamic inventory script that would read from a local file contain list of hostnames only?
did you try to simply cat the file ?
Hi
No, but I thought that the format of the script needs to adhere to a JSON format.
a 'flat file' will work with the ini plugin, no need to create a script.
Hi
Oh, can you explain how you would do that in the Ansible code? I have just started using Ansible and I don’t know the language too well. Thanks.
There is no code, default Ansible inventory is just a file with one host on each line.
https://docs.ansible.com/ansible/2.7/user_guide/intro_inventory.html#hosts-and-groups