Changing http port for a host that ansible uses to connect to a host

You're mixing a few things up here.

1. Ansible doesn't have anything to do with 'http'. The only thing it
uses is SSH, which runs op port 22 by default.
2. If you want to run this on a different port, use the 'ansible_port' option.
3. 'ansible_host' configures the *host* that ansible connects to.

Please read https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#working-with-inventory

Dick