ansible-for-i icon indicating copy to clipboard operation
ansible-for-i copied to clipboard

ibmi_cl_command stdout_lines issue

Open lmaleasi opened this issue 3 years ago • 2 comments

Hello, The ibmi_cl_command doesn't seems to work as expected for its return; in version 1.2.0 of the collection the following command return as good stdout_lines: - ibmi_cl_command: cmd: dspsysval qmaxjob register: result "result": { "changed": false, "cmd": "DSPSYSVAL QMAXJOB", "delta": "0:00:00.230820", "end": "2021-07-08 11:14:22.986098", "failed": false, "job_log": [], "job_name": "", "joblog": false, "rc": 0, "start": "2021-07-08 11:14:22.755278", "stderr": "", "stderr_lines": [], "stdout": " System Values Page 1\n5770SS1 V7R3M0 160422 QEDD1 08/07/21 11:14:22 CEST\n Current Shipped\n Name value value Description\n QMAXJOB 163520 163520 Maximum number of jobs\n Note: > means current value is different from the shipped value\n * * * * * E N D O F L I S T I N G * * * * *\n", "stdout_lines": [ " System Values Page 1", "5770SS1 V7R3M0 160422 QEDD1 08/07/21 11:14:22 CEST", " Current Shipped", " Name value value Description", " QMAXJOB 163520 163520 Maximum number of jobs", " Note: > means current value is different from the shipped value", " * * * * * E N D O F L I S T I N G * * * * *" ] }

But for all the higher versions, here is the output: "result": { "changed": false, "cmd": "dspsysval qmaxjob", "delta": "0:00:00.338841", "end": "2021-07-08 11:14:41.491128", "failed": false, "job_log": [], "job_name": "504449/QUSER/QSQSRVR", "joblog": false, "rc": 0, "start": "2021-07-08 11:14:41.152287", "stderr": "", "stderr_lines": [], "stdout": "{'success': '+++ success dspsysval qmaxjob'}", "stdout_lines": [ "{'success': '+++ success dspsysval qmaxjob'}" ] }

lmaleasi avatar Jul 08 '21 09:07 lmaleasi

Thanks for catching. This issue is a regression when I removed the converting upper case for the command string when passing to itoolkit underneath due to a complain for 'password should not convert to upper case'. I will fix it next release. As a workaround, could you please use upper case for the command 'DSPSYSVAL QMAXJOB' instead?

changlexc avatar Jul 09 '21 00:07 changlexc

Hi @changlexc, I confirm that the workaround is working well in the last version of the collection (1.4.0) Thank you for your fast reaction ;-)

lmaleasi avatar Jul 09 '21 07:07 lmaleasi