ansible-oracle
ansible-oracle copied to clipboard
bug: extra indents in yaml blocks produce unwanted newlines
It showed particulary in oradb_rman role, where due to additional indents in >-
block unwanted newlines were produced by builtin.shell command line, which caused the task to fail. Due to the syntax of commandline produced this however did not produce exitcode != 0 and was not recognised as failed by ansible.
Here is how a command looked like:
cmd: "/u01/app/oracle/bin/rman_backup.sh\n -a parameter\n -s CDB1\n -r /u01/app/oracle/rman\n -l /u01/app/oracle/rman/log | tee -a /var/log/oracle/rman/log/rman_parameter.log"
This of course produced following output:
stdout: "Missing parameter for ORACLE_SID\n \nUsage:\n rman_backup.sh -a
Similar problems, yet rather optical than functional have been corrected over entire roles/ code basis. Only where extra indenting was done inside {{ ... }} blocks, it has not been removed, as it did not introduce any unexpected newlines.