python - How to run Ansible without specifying the inventory but the host directly? - Stack Overflow
I know this question is really old but think that this little trick might helpful for future users who need help for this:ansible-playbook -i '10.254.3.133,' site.ymlif you run for local host:ansible-playbook -i 'localhost,' --connection=local site.ymlThe trick is that after ip address/dns name, put the comma inside the quotes.Hope this will help.
via python - How to run Ansible without specifying the inventory but the host directly? - Stack Overflow.