ansible-collections / ibm_zos_core

Red Hat Ansible Certified Content for IBM Z
75 stars 44 forks source link

[Bug] [zos_copy] [zos_fetch] [community] ansible-core:2.17 with verbosity causes module failure #1569

Open ketankelkar opened 5 days ago

ketankelkar commented 5 days ago

Running zos_copy/zos_fetch/zos_script with ansible-core:2.17 or higher with verbosity -v, -vv, and -vvv causes the modules to fail.

Running the same playbook tasks without any verbosity or with verbosity 4 (-vvvv) or higher however does not raise the same issue.

Recreate

The recreate playbook (see attached file recreate.yml.txt) is set up for zos_copy, zos_fetch, and zos_script. Each scenario is organized into a block with a tag. To run a scenario, use the --tags flag:

The following commands will cause the playbook to fail:

Affected modules

Preliminary Findings

There seems to have been a change in the way the sftp/scp command is constructed

https://github.com/ansible/ansible/blame/a8e4106c4748995ff4e6b91e84d7692b654b721f/lib/ansible/plugins/connection/ssh.py#L731

compare ansible-core:2.17 output:

SH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ketan"' -o ConnectTimeout=10 -o 'ControlPath="/Users/ketan/.ansible/cp/6bdc47fa45"' -tt <url>.ibm.com 'mkdir -p /tmp/ansible-zos-copy-payload-D240702-T141144'

with ansible-core:2.16 output:

SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ketan"' -o ConnectTimeout=10 -o 'ControlPath="/Users/ketan/.ansible/cp/6bdc47fa45"' -tt <url>.ibm.com 'mkdir -p /tmp/ansible-zos-copy-payload-D240702-T141250'

Historical context:

Take a look at:

And the associated "fix"

Temporary Fix:

In the action plugin for zos_copy, there is a section which ignores stderr if the verbosity level is high enough. https://github.com/ansible-collections/ibm_zos_core/blob/4b9a7e9846f9c1f81898e21f7a33a3e5c2948321/plugins/action/zos_copy.py#L365

As a temporary fix, the limit for the number of verbosity may be decreased (probably to 0) to have the stderr ignored for all levels of verbosity.

It is unclear at this time what effects such a temporary fix would have in terms of masking other errors reported in stderr.

verbose output:

-vvv output for zos_copy with ansible-core:2.17

TASK [zos copy] *************************************************************************************************************************************************************************************************************************************************************************************************
task path: /Users/ketan/dev/playbooks/depr-warning/ughh/hi.yml:50
<host> ESTABLISH SSH CONNECTION FOR USER: ketan
<host> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ketan"' -o ConnectTimeout=10 -o 'ControlPath="/Users/ketan/.ansible/cp/6bdc47fa45"' -tt <host> 'mkdir -p /tmp/ansible-zos-copy-payload-D240702-T141144'
<host> (0, b'', b"OpenSSH_9.6p1, LibreSSL 3.3.6\r\ndebug1: Reading configuration data /Users/ketan/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files\r\ndebug1: /etc/ssh/ssh_config line 54: Applying options for *\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/ketan/.ssh/known_hosts'\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/ketan/.ssh/known_hosts2'\r\ndebug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling\r\ndebug1: auto-mux: Trying existing master at '/Users/ketan/.ansible/cp/6bdc47fa45'\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 81455\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet_timeout: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to <host> closed.\r\n")
<host> ibm_zos_copy SSH transfer method updated from smart to sftp.
<host> ibm_zos_copy: put /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argd TO /tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd
<host> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ketan"' -o ConnectTimeout=10 -o 'ControlPath="/Users/ketan/.ansible/cp/6bdc47fa45"' '[host]'
<host> (0, b'sftp> put /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argd /tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd\n', b'OpenSSH_9.6p1, LibreSSL 3.3.6\r\ndebug1: Reading configuration data /Users/ketan/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files\r\ndebug1: /etc/ssh/ssh_config line 54: Applying options for *\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts\' -> \'/Users/ketan/.ssh/known_hosts\'\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts2\' -> \'/Users/ketan/.ssh/known_hosts2\'\r\ndebug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling\r\ndebug1: auto-mux: Trying existing master at \'/Users/ketan/.ansible/cp/6bdc47fa45\'\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 81455\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug2: Sending SSH2_FXP_REALPATH "."\r\ndebug3: Sent message fd 3 T:16 I:1\r\ndebug3: SSH2_FXP_REALPATH . -> /home/ketan\r\ndebug3: Looking up /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argd\r\ndebug2: Sending SSH2_FXP_STAT "/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd"\r\ndebug3: Sent message fd 3 T:17 I:2\r\ndebug1: stat remote: No such file or directory\r\ndebug2: sftp_upload: upload local "/var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argd" to remote "/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd"\r\ndebug2: Sending SSH2_FXP_OPEN "/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd"\r\ndebug3: Sent dest message SSH2_FXP_OPEN I:3 P:/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd M:0x001a\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:0 S:11\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 11 bytes at 0\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet_timeout: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<host> ibm_zos_copy return code: 0
<host> ibm_zos_copy stdout: b'sftp> put /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argd /tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd\n'
<host> ibm_zos_copy stderr: b'OpenSSH_9.6p1, LibreSSL 3.3.6\r\ndebug1: Reading configuration data /Users/ketan/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files\r\ndebug1: /etc/ssh/ssh_config line 54: Applying options for *\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts\' -> \'/Users/ketan/.ssh/known_hosts\'\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts2\' -> \'/Users/ketan/.ssh/known_hosts2\'\r\ndebug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling\r\ndebug1: auto-mux: Trying existing master at \'/Users/ketan/.ansible/cp/6bdc47fa45\'\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 81455\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug2: Sending SSH2_FXP_REALPATH "."\r\ndebug3: Sent message fd 3 T:16 I:1\r\ndebug3: SSH2_FXP_REALPATH . -> /home/ketan\r\ndebug3: Looking up /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argd\r\ndebug2: Sending SSH2_FXP_STAT "/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd"\r\ndebug3: Sent message fd 3 T:17 I:2\r\ndebug1: stat remote: No such file or directory\r\ndebug2: sftp_upload: upload local "/var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argd" to remote "/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd"\r\ndebug2: Sending SSH2_FXP_OPEN "/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd"\r\ndebug3: Sent dest message SSH2_FXP_OPEN I:3 P:/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd M:0x001a\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:0 S:11\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 11 bytes at 0\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet_timeout: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n'
<host> play context verbosity: 3
<host> ibm_zos_copy SSH transfer method restored to smart
fatal: [np9]: FAILED! => {
    "changed": false,
    "msg": "Error transfering source '/var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argd' to remote z/OS system",
    "rc": 0,
    "stderr": "debug1: Reading configuration data /Users/ketan/.ssh/configdebug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no filesdebug1: /etc/ssh/ssh_config line 54: Applying options for *debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/ketan/.ssh/known_hosts'debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/ketan/.ssh/known_hosts2'debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disablingdebug1: auto-mux: Trying existing master at '/Users/ketan/.ansible/cp/6bdc47fa45'debug2: fd 3 setting O_NONBLOCKdebug2: mux_client_hello_exchange: master version 4debug3: mux_client_forwards: request forwardings: 0 local, 0 remotedebug3: mux_client_request_session: enteringdebug3: mux_client_request_alive: enteringdebug3: mux_client_request_alive: done pid = 81455debug3: mux_client_request_session: session request sentdebug1: mux_client_request_session: master session id: 2debug2: Remote version: 3debug2: Server supports extension \"posix-rename@openssh.com\" revision 1debug2: Server supports extension \"statvfs@openssh.com\" revision 2debug2: Server supports extension \"fstatvfs@openssh.com\" revision 2debug2: Server supports extension \"hardlink@openssh.com\" revision 1debug2: Server supports extension \"fsync@openssh.com\" revision 1debug2: Sending SSH2_FXP_REALPATH \".\"debug3: Sent message fd 3 T:16 I:1debug3: SSH2_FXP_REALPATH . -> /home/ketandebug3: Looking up /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argddebug2: Sending SSH2_FXP_STAT \"/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd\"debug3: Sent message fd 3 T:17 I:2debug1: stat remote: No such file or directorydebug2: sftp_upload: upload local \"/var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argd\" to remote \"/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd\"debug2: Sending SSH2_FXP_OPEN \"/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd\"debug3: Sent dest message SSH2_FXP_OPEN I:3 P:/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd M:0x001adebug3: Sent message SSH2_FXP_WRITE I:5 O:0 S:11debug3: SSH2_FXP_STATUS 0debug3: In write loop, ack for 5 11 bytes at 0debug3: Sent message SSH2_FXP_CLOSE I:4debug3: SSH2_FXP_STATUS 0debug3: mux_client_read_packet_timeout: read header failed: Broken pipedebug2: Received exit status from master 0",
    "stderr_lines": [
        "debug1: Reading configuration data /Users/ketan/.ssh/configdebug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no filesdebug1: /etc/ssh/ssh_config line 54: Applying options for *debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/ketan/.ssh/known_hosts'debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/ketan/.ssh/known_hosts2'debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disablingdebug1: auto-mux: Trying existing master at '/Users/ketan/.ansible/cp/6bdc47fa45'debug2: fd 3 setting O_NONBLOCKdebug2: mux_client_hello_exchange: master version 4debug3: mux_client_forwards: request forwardings: 0 local, 0 remotedebug3: mux_client_request_session: enteringdebug3: mux_client_request_alive: enteringdebug3: mux_client_request_alive: done pid = 81455debug3: mux_client_request_session: session request sentdebug1: mux_client_request_session: master session id: 2debug2: Remote version: 3debug2: Server supports extension \"posix-rename@openssh.com\" revision 1debug2: Server supports extension \"statvfs@openssh.com\" revision 2debug2: Server supports extension \"fstatvfs@openssh.com\" revision 2debug2: Server supports extension \"hardlink@openssh.com\" revision 1debug2: Server supports extension \"fsync@openssh.com\" revision 1debug2: Sending SSH2_FXP_REALPATH \".\"debug3: Sent message fd 3 T:16 I:1debug3: SSH2_FXP_REALPATH . -> /home/ketandebug3: Looking up /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argddebug2: Sending SSH2_FXP_STAT \"/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd\"debug3: Sent message fd 3 T:17 I:2debug1: stat remote: No such file or directorydebug2: sftp_upload: upload local \"/var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmpci_7argd\" to remote \"/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd\"debug2: Sending SSH2_FXP_OPEN \"/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd\"debug3: Sent dest message SSH2_FXP_OPEN I:3 P:/tmp/ansible-zos-copy-payload-D240702-T141144/tmpci_7argd M:0x001adebug3: Sent message SSH2_FXP_WRITE I:5 O:0 S:11debug3: SSH2_FXP_STATUS 0debug3: In write loop, ack for 5 11 bytes at 0debug3: Sent message SSH2_FXP_CLOSE I:4debug3: SSH2_FXP_STATUS 0debug3: mux_client_read_packet_timeout: read header failed: Broken pipedebug2: Received exit status from master 0"
    ]
}

-vvv output for zos_copy with ansible-core:2.16:

TASK [zos copy] *************************************************************************************************************************************************************************************************************************************************************************************************
task path: /Users/ketan/dev/playbooks/depr-warning/ughh/hi.yml:50
<host> ESTABLISH SSH CONNECTION FOR USER: ketan
<host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ketan"' -o ConnectTimeout=10 -o 'ControlPath="/Users/ketan/.ansible/cp/6bdc47fa45"' -tt <host> 'mkdir -p /tmp/ansible-zos-copy-payload-D240702-T141250'
<host> (0, b'', b'Shared connection to <host> closed.\r\n')
<host> ibm_zos_copy SSH transfer method updated from None to sftp.
<host> ibm_zos_copy: put /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmp711qq_m3 TO /tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3
<host> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ketan"' -o ConnectTimeout=10 -o 'ControlPath="/Users/ketan/.ansible/cp/6bdc47fa45"' '[TASK [zos copy] *************************************************************************************************************************************************************************************************************************************************************************************************
task path: /Users/ketan/dev/playbooks/depr-warning/ughh/hi.yml:50
<host> ESTABLISH SSH CONNECTION FOR USER: ketan
<host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ketan"' -o ConnectTimeout=10 -o 'ControlPath="/Users/ketan/.ansible/cp/6bdc47fa45"' -tt >host> 'mkdir -p /tmp/ansible-zos-copy-payload-D240702-T141250'
<host> (0, b'', b'Shared connection to <host> closed.\r\n')
<host> ibm_zos_copy SSH transfer method updated from None to sftp.
<host> ibm_zos_copy: put /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmp711qq_m3 TO /tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3
<host> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ketan"' -o ConnectTimeout=10 -o 'ControlPath="/Users/ketan/.ansible/cp/6bdc47fa45"' '[host]'
<host> (0, b'sftp> put /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmp711qq_m3 /tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3\n', b'')
<host> ibm_zos_copy return code: 0
<host> ibm_zos_copy stdout: b'sftp> put /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmp711qq_m3 /tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3\n'
<host> ibm_zos_copy stderr: b''
<host> play context verbosity: 3
<host> ibm_zos_copy SSH transfer method restored to None
<host> ibm_zos_copy temp path: /tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3
Using module file /Users/ketan/.ansible/collections/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_copy.py
Pipelining is enabled.
<host> ESTABLISH SSH CONNECTION FOR USER: ketan
<host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ketan"' -o ConnectTimeout=10 -o 'ControlPath="/Users/ketan/.ansible/cp/6bdc47fa45"' <host> '/bin/sh -c '"'"'_BPXK_AUTOCVT=ON _CEE_RUNOPTS='"'"'"'"'"'"'"'"'FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)'"'"'"'"'"'"'"'"' _TAG_REDIR_ERR=txt _TAG_REDIR_IN=txt _TAG_REDIR_OUT=txt LANG=C ZOAU=/global/zoautil/1.3.1.0/bin LIBPATH=/global/zoautil/1.3.1.0/lib/:/home/ketan/venvs/3.11/zoau-1.3.1.0/lib:/lib:/usr/lib:. PATH=/global/zoautil/1.3.1.0/bin:/home/ketan/venvs/3.11/zoau-1.3.1.0/bin:/bin:/usr/sbin:/var/bin:. PYTHONPATH='"'"'"'"'"'"'"'"''"'"'"'"'"'"'"'"' PYTHONSTDINENCODING=cp1047 /home/ketan/venvs/3.11/zoau-1.3.1.0/bin/python3 && sleep 0'"'"''
<host> (0, b'\n{"changed": true, "dest_data_set_attrs": {"name": "KETAN.ANSIBLE.SOMEDS", "type": "SEQ", "space_primary": 2, "space_secondary": 1, "record_format": "FB", "record_length": 1028, "block_size": 32760, "space_type": "K"}, "src": "/tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3", "dest": "KETAN.ANSIBLE.SOMEDS", "ds_type": "SEQ", "dest_exists": false, "backup_name": null, "invocation": {"module_args": {"content": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "dest": "KETAN.ANSIBLE.SOMEDS", "src": "/tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3", "encoding": {"from": "UTF-8", "to": "IBM-1047"}, "is_binary": false, "executable": false, "asa_text": false, "aliases": false, "backup": false, "local_follow": true, "remote_src": false, "ignore_sftp_stderr": false, "validate": false, "use_template": false, "force": false, "force_lock": false, "backup_name": null, "volume": null, "dest_data_set": null, "template_parameters": null, "mode": null, "owner": null, "group": null, "tmp_hlq": null, "from_encoding": "UTF-8", "to_encoding": "IBM-1047"}}}\n', b'')
changed: [np9] => {
    "changed": true,
    "dest": "KETAN.ANSIBLE.SOMEDS",
    "dest_created": true,
    "destination_attributes": {
        "block_size": 32760,
        "record_format": "fb",
        "record_length": 1028,
        "space_primary": 2,
        "space_secondary": 1,
        "space_type": "k",
        "type": "seq"
    },
    "invocation": {
        "module_args": {
            "content": "hello world",
            "dest": "KETAN.ANSIBLE.SOMEDS"
        }
    },
    "is_binary": false,
    "src": null
}]'
<host> (0, b'sftp> put /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmp711qq_m3 /tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3\n', b'')
<host> ibm_zos_copy return code: 0
<host> ibm_zos_copy stdout: b'sftp> put /var/folders/x6/l70tl3ns7_g5hj4k85t6ggsw0000gn/T/tmp711qq_m3 /tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3\n'
<host> ibm_zos_copy stderr: b''
<host> play context verbosity: 3
<host ibm_zos_copy SSH transfer method restored to None
<host> ibm_zos_copy temp path: /tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3
Using module file /Users/ketan/.ansible/collections/ansible_collections/ibm/ibm_zos_core/plugins/modules/zos_copy.py
Pipelining is enabled.
<host> ESTABLISH SSH CONNECTION FOR USER: ketan
<host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ketan"' -o ConnectTimeout=10 -o 'ControlPath="/Users/ketan/.ansible/cp/6bdc47fa45"' host '/bin/sh -c '"'"'_BPXK_AUTOCVT=ON _CEE_RUNOPTS='"'"'"'"'"'"'"'"'FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)'"'"'"'"'"'"'"'"' _TAG_REDIR_ERR=txt _TAG_REDIR_IN=txt _TAG_REDIR_OUT=txt LANG=C ZOAU=/global/zoautil/1.3.1.0/bin LIBPATH=/global/zoautil/1.3.1.0/lib/:/home/ketan/venvs/3.11/zoau-1.3.1.0/lib:/lib:/usr/lib:. PATH=/global/zoautil/1.3.1.0/bin:/home/ketan/venvs/3.11/zoau-1.3.1.0/bin:/bin:/usr/sbin:/var/bin:. PYTHONPATH='"'"'"'"'"'"'"'"''"'"'"'"'"'"'"'"' PYTHONSTDINENCODING=cp1047 /home/ketan/venvs/3.11/zoau-1.3.1.0/bin/python3 && sleep 0'"'"''
<host> (0, b'\n{"changed": true, "dest_data_set_attrs": {"name": "KETAN.ANSIBLE.SOMEDS", "type": "SEQ", "space_primary": 2, "space_secondary": 1, "record_format": "FB", "record_length": 1028, "block_size": 32760, "space_type": "K"}, "src": "/tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3", "dest": "KETAN.ANSIBLE.SOMEDS", "ds_type": "SEQ", "dest_exists": false, "backup_name": null, "invocation": {"module_args": {"content": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "dest": "KETAN.ANSIBLE.SOMEDS", "src": "/tmp/ansible-zos-copy-payload-D240702-T141250/tmp711qq_m3", "encoding": {"from": "UTF-8", "to": "IBM-1047"}, "is_binary": false, "executable": false, "asa_text": false, "aliases": false, "backup": false, "local_follow": true, "remote_src": false, "ignore_sftp_stderr": false, "validate": false, "use_template": false, "force": false, "force_lock": false, "backup_name": null, "volume": null, "dest_data_set": null, "template_parameters": null, "mode": null, "owner": null, "group": null, "tmp_hlq": null, "from_encoding": "UTF-8", "to_encoding": "IBM-1047"}}}\n', b'')
changed: [np9] => {
    "changed": true,
    "dest": "KETAN.ANSIBLE.SOMEDS",
    "dest_created": true,
    "destination_attributes": {
        "block_size": 32760,
        "record_format": "fb",
        "record_length": 1028,
        "space_primary": 2,
        "space_secondary": 1,
        "space_type": "k",
        "type": "seq"
    },
    "invocation": {
        "module_args": {
            "content": "hello world",
            "dest": "KETAN.ANSIBLE.SOMEDS"
        }
    },
    "is_binary": false,
    "src": null
}