The trick is to append a "," (comma) to the hostname or IPv4/v6 address on the command line:
$ ansible all -
i host.example.com, [the rest of the directive here…]
i
$ ansible all - 10.17.234.197, [the rest of the directive here…]
To run a playbook for just one host, make sure the hosts directive in the playbook contains all and call ansible-playbook like the above:
# Requires 'hosts: all' in your playbook
$ ansible-playbook -
i host.example.com, playbook.yml
In both cases, the host parameter preceding the comma can be either a hostname or an IPv4/v6 address.
This works because if Ansible notices a comma, it thinks it is a list of hosts, but you are actually only defining one.