May 14, 2017
Ansible: Misleading dopy errors
Ansible works pretty well with DigitalOcean, and where it is not, it is mostly the fault of dopy, not DigitalOcean’s or Ansible’s. I am using macOS and out of convenience I installed Ansible via Homebrew. When trying certain actions, for example destroying a Droplet, I got this error message:
dopy >= 0.2.3 required for this module
This was weird, as I was sure I had installed dopy via pip (and pip via Homebrew). After double-checking and some digging I found the issue to be with the Ansible installation. To fix the issue at hand, one can either add
localhost ansible_connection=local ansible_python_interpreter=python
to the hosts file, or run
/usr/local/Cellar/ansible/18.104.22.168_2/libexec/bin/pip install dopy==0.3.7a.