Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: extra indents in yaml blocks produce unwanted newlines #420

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

bartowl
Copy link
Contributor

@bartowl bartowl commented Mar 8, 2024

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 -s <ORACLE_SID|DB_NAME> [-r ]\n [-l ] [-c ] [-t ]\n [--service <Servicename in GI/Restart>]\n rman_backup.sh -h",

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.

@Rendanic Rendanic added the bug label Mar 12, 2024
@Rendanic Rendanic added this to the 4.6 milestone Mar 12, 2024
@Rendanic Rendanic modified the milestones: 4.6, 4.7 Mar 21, 2024
@Rendanic Rendanic merged commit 821b8e7 into oravirt:master Mar 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants