oravirt / ansible-oracle-modules

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

Fail if user could not be deleted #59

Closed anonfriese closed 6 years ago

anonfriese commented 6 years ago

If the Oracle User could not be deleted (for example because there are still open connections), the module falsely gives a Success-Message. With this PR the Error Message from Oracle will be propagated properly.

Before: [16:11:46] oracle : Drop Oracle User [XXX] | XXX | SUCCESS | 926ms

After:

[16:14:42] oracle : Drop Oracle User [XXX] | XXX | FAILED | 1143ms
{
  - msg: Blergh, something went wrong while dropping the schema - ORA-01940: Ein Benutzer, der gerade mit der DB verbunden ist, kann nicht geloscht werden sql: drop user XXX cascade
  - _ansible_parsed: True
  - changed: False
}
oravirt commented 6 years ago

Thanks! This module (and a couple of others) are in need of a re-factor. I’ll do that as soon as time permits