Thanks for this.
I have a couple of suggestions:
Consider using 'argparse' so that the inventory file can be specified as it is hard coded to inventory.cfg at the moment.
would be nice to be able to configure the path to the 'facts' dir and also the port that the server listens on.
Consider tracking the line number in inventory_read so if it is unable to parse inventory it is possible to see where the error occurs.
I tried with one of my inventory files and it fails like this
Traceback (most recent call last):
File "visansible.py", line 1663, in <module>
inventory_read()
File "visansible.py", line 1604, in inventory_read
value = line.split("=")[1].strip()
IndexError: list index out of range
I think maybe the inventory_read method doesn't handle the [group_name:children] or [group_name:vars] syntax that ansible inventory allows.
Jon