Ansible is usually used to configure a remote machine. So the expectation is to run it from your local computer or some other server that has SSH access to the VPS. This is mentioned in the docs:
First, you need to install Ansible on your local computer. You also need to install the Docker SDK for Python using pip install docker (more info in Ansible documentation).
Ansible will SSH into the VPS and configure it according to the playbook.