Open davidjpeacock opened 8 years ago
+1, still an issue for me.
From comments on ansible/ansible-modules-core#2509 - here's a temporary solution:
localhost ansible_python_interpreter=python
pip install six
pip install 'dopy>=0.3.5,<=0.3.5'
This issue was resolved for me by upgrading to ansible 2.0.2.
@regentgal Running 2.0.2.0 here :(
Is this really a dopy issue? I have the same basic problem with dopy 0.3.5 (just with another error message). The basic problem as far as I can say is this: Ansible uses /opt/bin/python unless explicitly configured to use another Python interpreter. So even if you are running Ansible itself with another Python, when connecting (even to localhost) Ansible uses /opt/bin/python. Now the question becomes: "where" did you install dopy? In the import path for /usr/bin/python or in the import path for the Python you are using to start Ansible?
I just confirmed this by printing sys.executable
from inside the digital_ocean Ansible module.
Without setting ansible_python_interpreter
the Python used was /opt/bin/python and I hadn't installed dopy into its import path.
So please check, which Python are using? Mine is either in a virtualenv or at /usr/local/bin (installed via HomeBrew)
:-)
https://github.com/ansible/ansible-modules-core/issues/2509