-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'DoError' is not defined #50
Comments
which version of dopy did you install on the target machine(s)? |
Hi @kontrafiktion, I am running As I understand it, ansible is using dopy for the digital ocean api wrapper to create the machines, so I do not have dopy installed on those target machines, only my main command and control machine. |
Your playbook above says |
Ah, I totally forgot: you might need to add the following to the 'digitalocean' declaration in inventory:
|
Ok, this has been working fine for me for most of the year .. now something has upgraded and I'm getting;
I've tried messing with different versions of dopy from 0.3.5 to 0.3.7.a, doesn't seem to make any difference, and I've tried adding the other suggested options, but nothing seems to make a difference. |
Looking at "digital_ocean.py", it's failing to find "dopy", even though I've checked the executable running is /usr/bin/python, and /usr/bin/python can import "dopy" fine from the command prompt. Is Ansible / digital_ocean messing with the import path? |
see #50 (comment) |
Mmm, not helpful. If you mean add th ansible_python_interpreter, yes, done that - no difference. If you mean try 0.3.7a, yes, done that too. I've inserted code to check the executable is what it should be, and I've tried removing some "try" blocks to clarify the error. For some reason it thinks "dopy" is not a module when it clearly is. |
I only have seen this error, when the target machine on which Ansible is executing the playbook does not have dopy installed for the "python" that is used by Ansible.
|
I'm a little past that .. I'm messing around with "digital_ocean.py", from what I can see there's some sort of virtual environment or chrooting going on, which is bizarre. If I get digital_ocean.py to print out some stuff just before it bails, it confirms both the executable and the PYTHONPATH stuff is correct, but if I use "walk" to list the contents of the folder that should contain "dopy", it's just not there .. whereas outside of the program it IS there .. so as far as I can see it's not a function of the Python binary in use - it's an issue with the binary being able to "see" the folders it's modules are in. Will investigate further. |
Ok, ignore me - something has removed "dopy" from my live server, I think I'm looking for the problem in the wrong place ... |
Ok, fixed by adding (-e 'ansible_python_interpreter=pypy') to the Ansible command line .. I think I can see what the issue "is", the development box is running Ansible using cpython, while the deployment server is using pypy .. but this has always been the case (or so I thought) and it's been working daily ... I need to work out what changed .. |
Greetings @zbal ,
I am hitting an issue with dopy where it throws a
NameError: name 'DoError' is not defined
.Here is what I am doing...
Playbook: 'digitalocean.yml'
Running ansible playbook in verbose mode:
The next line shows this Error:
I am not sure how to debug this further. Any suggestions?
Cheers!
The text was updated successfully, but these errors were encountered: