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:
ansible-playbook -i inventories recreate.yml --tags b
The following commands will cause the playbook to fail:
ansible-playbook -i inventories recreate.yml -v
ansible-playbook -i inventories recreate.yml -vv
ansible-playbook -i inventories recreate.yml -vvv
The follow commands should succeed:
Running
zos_copy
/zos_fetch
/zos_script
withansible-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
, andzos_script
. Each scenario is organized into a block with a tag. To run a scenario, use the--tags
flag:ansible-playbook -i inventories recreate.yml --tags b
The following commands will cause the playbook to fail:
ansible-playbook -i inventories recreate.yml -v
ansible-playbook -i inventories recreate.yml -vv
ansible-playbook -i inventories recreate.yml -vvv
The follow commands should succeed:ansible-playbook -i inventories recreate.yml
ansible-playbook -i inventories recreate.yml -vvvv
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:
with ansible-core:2.16 output:
Historical context:
Take a look at:
150
And the associated "fix"
153
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 forzos_copy
with ansible-core:2.17-vvv
output forzos_copy
withansible-core:2.16
: