I have a host file that looks like
[foo] foox 192.168.0.1 id=1 fooy 192.168.0.1 id=2 fooz 192.168.0.1 id=3
However, I\'d like to more conci
This is best done using Ansible's Dynamic Inventory features. See Developing Dynamic Inventory Sources.
This means writing a script that returns your hostname in a JSON format.