Closed serpro69 closed 4 years ago
Well my thought was correct, the cx_Oracle has to be installed for /usr/bin/python
. Is there any way to make it work with virtualenv?
Hi Sergio,
You can make it work with the venv by pointing ansibles python interpreter to it. You can do this as an extra var or in the inventory file as well.
ansible-playbook -i inventory site.yml -e “ansible_python_interpreter=path/to/venv/python”
On Wed, Nov 20, 2019 at 09:14 Sergio Pro notifications@github.com wrote:
Well my thought was correct, the cx_Oracle has to be installed for /usr/bin/python. Is there any way to make it work with virtualenv?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/oravirt/ansible-oracle-modules/issues/116?email_source=notifications&email_token=AHY4VPY7DS42AEX7UEO3JRDQUVH6RA5CNFSM4JPTWTVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEESJ3XI#issuecomment-556047837, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHY4VPYNNXJBAIRLWEZWWIDQUVH6RANCNFSM4JPTWTVA .
Thanks @tdavison784, will try that. I have tried setting that var from playbook, but that didn't work (maybe because of variable precedence). Haven't thought to set it from command line though. I suppose the issue can be closed since this is unrelated to the ansible-oracle-modules
Hi,
I'm facing getting an error when running the modules:
I have the
cx_Oracle
installed:ORACLE_HOME
andLD_LIBRARY_PATH
are also set:I have tested the connection to db with
sqlplus
and that works fine as well.I can import
cx_Oracle
from the cli:But for some reason this fails when used from the ansible module. I thought the python virtual environment might be the reason but I tried installing cx_Oracle outside the venv and it still fails with the same error. Though I have a hunch it's something to do with the virtual env. Do you know what am I doing wrong here? Thanks.