oravirt / ansible-oracle-modules

Oracle modules for Ansible
MIT License
214 stars 159 forks source link

How to handle comments in the oracle_sql #128

Closed anandsolomon closed 4 years ago

anandsolomon commented 4 years ago

Hi, I am using oracle_sql module and running a sql script. The sql script contains comments. The playbook fails because " FAILED! => {"changed": false, "msg": "Something went wrong while executing sql - ORA-00911: invalid character sql:

Is there a way I can keep the comments and execute the sql script ?

oravirt commented 4 years ago

Can you show me contents of the script?

I'm not sure if I deal with comments at all actually... This module is pretty much in a perpetual alpha state (and should probably be treated as such), as it was something I quickly threw together at a time when I needed to run single SQL's that wasn't covered by functionality in the other modules. I don't really update this module, but show me the contents of the script and I'll see if I can do something about it.

anandsolomon commented 4 years ago

This is taken care. Thanks for your help.

megadrifter commented 3 years ago

I could not use the file with comments

Neither / ... / noor -- works. Had to delete all comments.

oravirt commented 3 years ago

Like I said in the comment above, I don't handle comments. Also, If you've have the need to run actual scripts, there are way better ways (and tools) to do that then with this module. This module is basically meant to run simple sql's