ansible-oracle
ansible-oracle copied to clipboard
Python module: cx_Oracle is oracledb now
Hi,
cx_Oracle (https://oracle.github.io/python-cx_Oracle/) is oracledb (https://oracle.github.io/python-oracledb/) now.
Please consider to support both or to upgrade the modules to oracledb.
Something like that:
try:
import oracledb as connect_ora
except ImportError:
oracledb_exists = False
try:
import cx_Oracle as connect_ora
except ImportError:
cx_oracle_exists = False
else:
cx_oracle_exists = True
else:
oracledb_exists = True
cx_oracle_exists = False
for using it as "sqlplus / as sysdba" we have done somthing like that:
if oracledb_exists:
connect_ora.init_oracle_client()
conn = connect_ora.connect(mode=connect_ora.AUTH_MODE_SYSDBA)
elif not oracledb_exists and cx_oracle_exists:
conn = connect_ora.connect('/', mode=connect_ora.SYSDBA)
Thanks.
made a propose for module oracle_user: https://github.com/oravirt/ansible-oracle/compare/master...aliensmily:ansible-oracle:patch-1
This issue is stale because it has been open for 30 days with no activity. Auto close in 30 days.