I see that Ansible provide some pre-defined variables that we can use in playbooks and template files. For example, the host ip address is ansible_eth0.ipv4.address. Googlei
Note the official docs on connection configuration variables or "behavioral" variables - which aren't listed in host vars, appears to be List of Behavioral Inventory Parameters in the Inventory documentation.
P.S. The sudo option is undocumented there (yes its sudo not ansible_sudo as you'd expect ...) and probably a couple more aren't, but thats best doc I've found on em.