requirements:
PyYAML==3.13
deepdiff==3.3.0
jsonpickle==1.0
ansible-inventory -i ./originalinventory/hosts --playbook-dir . -y --list --export > /tmp/original-inventory.yml
ansible-inventory -i ./newinventory/hosts --playbook-dir . -y --list --export > /tmp/new-inventory.yml
this will export the whole inventory, with groups and group vars in the yaml format
python compare.py /tmp/new-inventory.yml /tmp/original-inventory.yml
it will print what changed in the 2 inventories (groups/variables/hosts added and removed)