Closed anandsolomon closed 4 years ago
You either need to have it on the manager server or the ansible controller and delegate the task to the controller
On Thu, Jan 2, 2020 at 08:19 anandsolomon notifications@github.com wrote:
Hi, Do we have to have cx_Oracle on the managed server ? I tried to run my playbook, I am not able to run it without cx_Oracle on the managed server. The same playbook works with cx_Oracle on the managed server is not working when it is not installed.
— 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/120?email_source=notifications&email_token=AHY4VPZPTHWWCCCLJI2ENULQ3XZWVA5CNFSM4KCCYN4KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IDV4PXA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHY4VP4UJI5PXNXYJEVHGBLQ3XZWVANCNFSM4KCCYN4A .
Hi, I am trying to run a sql statement from ansible control server to the Oracle managed server (RDS DB instance). I have oracle instant client, cx_Oracle module installed on the control server. When running a playbook, I am getting the below error.
TASK [sample cx_oracle] *** fatal: [22.174.101.30]: FAILED! => {"changed": false, "msg": "The cx_Oracle module is required. Also set LD_LIBRARY_PATH & ORACLE_HOME"}
Here is my playbook
hosts: all vars: oracle_home: /u01/app/oracle/product/12.2.0.1/dbhome_1 user: tstsch password: tstsch prt: "1521" oracle_env: ORACLE_HOME: "{{ oracle_home }}" LD_LIBRARY_PATH: "{{ oracle_home }}/lib"
tasks:
name: sample cx_oracle oracle_sql: username: "{{ user }}" password: "{{ password }}" port: "{{ prt }}" service_name:
host:
script: /home/ansible/record.sql
environment: "{{ oracle_env }}"
register: select_opt
name: display output debug: var: select_opt