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. https://docs.python.org/3.8/library/argparse.html#module-argparse 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 On Tuesday, December 17, 2019 at 4:04:28 AM UTC, Oliver Dippel wrote: > > Hi, > hope you like it and it is useful: > > https://github.com/multigcs/visansible > > [image: network.png] > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/be5a5fd6-29c1-467c-a364-b0dd05d2482a%40googlegroups.com.
