Use the ansible-inventory command using the --graph:

ansible-inventory -i inventory --graph