ansible-oracle-modules
ansible-oracle-modules copied to clipboard
Cannot create a tablespace without giving a size
"Blergh, something went wrong while executing - ORA-02237: invalid file size sql: create bigfile tablespace users datafile size None"
{
"_ansible_item_label": "ora_meta_ocitest0",
"_ansible_item_result": true,
"_ansible_no_log": false,
"_ansible_parsed": true,
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"autoextend": false,
"bigfile": true,
"content": "permanent",
"datafile": null,
"hostname": "elhdb1-ocitest0-scan.ocitest0.elhubdevvcn.oraclevcn.com",
"maxsize": null,
"mode": "sysdba",
"nextsize": null,
"numfiles": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": "1521",
"service_name": "ora_meta_ocitest0.ocitest0.elhubdevvcn.oraclevcn.com",
"size": null,
"state": "present",
"tablespace": "users",
"user": "sys"
}
},
"item": "ora_meta_ocitest0",
"msg": "Blergh, something went wrong while executing - ORA-02237: invalid file size sql: create bigfile tablespace users datafile size None"
},
The size_clause is not mandatory in tablespace creation, and the API should support referring to the default.
I'll fix it
Fixed now. It'll error if size is not defined
But why should the Ansible module force a parameter that the database doesn't require?
No it's not required, but it's a behaviour (in Oracle) that is just horrible. You're going through the trouble to apply state to a resource so why not do that in a way so you know what you get?
That being said, it's probably a pretty easy fix to mimic this behaviour but I'm reluctant to do so....