The first character from each line in content seems to be cut off when dd_output is used. The same behavior does not occur in dd_data_set or dd_unix.
The NPx systems have some extra text configured into their ssh sessions, which makes the problem more apparent:
"dd_names": [
{
"byte_count": 257,
"content": [
"",
"ynamic setting of _BPX_SHAREAS IS: REUSE",
"ynamic setting of _BPX_SPAWN_SCRIPT IS:",
"ote: /ict zFS set built on Tue Jul 9 17:05:43 EDT 2013",
"ote: You are running on zOS Release z/OS 05.00 02",
"hall we play a game? (War Games, 1983)",
"NPUTRC Set to /etc/inputrc",
"bcd",
""
],
"dd_name": "stdout",
"name": "KETAN.P4081386.T0912661.C0000000",
"record_count": 9
}
],
The output above was a result of the following playbook task:
Here are playbook tasks and output using other types of dds for stdout:
dd_dat_set:
- name: do stuff
tags: e, dd_data_set
block:
- name: create data set for next step
zos_data_set:
name: "{{ some_ds }}"
type: seq
state: present
- name: mvs raw - echo abcd - output to dd_data_set
zos_mvs_raw:
verbose: true
program_name: bpxbatch
parm: "SH echo abcd"
dds:
- dd_data_set:
dd_name: stdout
data_set_name: "{{ some_ds }}"
register: output
- name: retrieve contents of data set.
command: "dcat {{ some_ds }}"
register: output
- name: print output
debug:
var: output.stdout_lines
- name: delete dat set from previous tasks
zos_data_set:
name: "{{ some_ds }}"
state: absent
output when dd_data_set is used for stdout:
TASK [retrieve contents of data set.] *************************************************************************************************************************************************************************************************************************************
changed: [zvm]
TASK [print output] *******************************************************************************************************************************************************************************************************************************************************
ok: [zvm] => {
"output.stdout_lines": [
"Dynamic setting of _BPX_SHAREAS IS: NO ",
"Dynamic setting of _BPX_SPAWN_SCRIPT IS: ",
"Note: /ict zFS set built on Tue Jul 9 17:05:43 EDT 2013 ",
"Note: You are running on zOS Release z/OS 05.00 02 ",
"Shall we play a game? (War Games, 1983) ",
"INPUTRC Set to /etc/inputrc ",
"abcd "
]
}
TASK [retrieve file contents] *********************************************************************************************************************************************************************************************************************************************
changed: [zvm]
TASK [print output] *******************************************************************************************************************************************************************************************************************************************************
ok: [zvm] => {
"output.stdout_lines": [
"Dynamic setting of _BPX_SHAREAS IS: REUSE",
"Dynamic setting of _BPX_SPAWN_SCRIPT IS: YES",
"Note: /ict zFS set built on Tue Jul 9 17:05:43 EDT 2013",
"Note: You are running on zOS Release z/OS 05.00 02",
"Shall we play a game? (War Games, 1983)",
"INPUTRC Set to /etc/inputrc",
"abcd"
]
}
Is there an existing issue for this?
Bug description
The first character from each line in
content
seems to be cut off whendd_output
is used. The same behavior does not occur in dd_data_set or dd_unix.The NPx systems have some extra text configured into their ssh sessions, which makes the problem more apparent:
The output above was a result of the following playbook task:
Here are playbook tasks and output using other types of dds for stdout:
dd_dat_set
:output when
dd_data_set
is used for stdout:playbook task using
dd_unix
for stdout:output when
dd_unix
is used for stdout:IBM z/OS Ansible core Version
v1.10.0-beta.1
IBM Z Open Automation Utilities
v1.3.0
IBM Enterprise Python
v3.11.x (default)
ansible-version
v2.16.x (default)
z/OS version
v2.5 (default)
Ansible module
zos_mvs_raw
Playbook verbosity output.
No response
Ansible configuration.
No response
Contents of the inventory
No response
Contents of
group_vars
orhost_vars
No response