Open ddimatos opened 6 days ago
With /bin/zsh
set in inventory ansible_shell_executable: /bin/zsh
- name: Show shell process used.
shell: "ps -p $$"
# shell: "ps -p $$ | iconv -f ibm-1047 -t iso8859-1"
register: result
Results in:
ok: [zvm] => {
"result": {
"changed": true,
"cmd": "ps -p $$",
"delta": "0:00:00.298883",
"end": "2024-06-27 21:46:25.171281",
"failed": false,
"msg": "",
"rc": 0,
"start": "2024-06-27 21:46:24.872398",
"stderr": "",
"stderr_lines": [],
"stdout": "@@@@@@@?@?@@@@@@@?@?\u0015@@?@o@@@@@@@@@?z?@a?a?\u0015",
"stdout_lines": [
"@@@@@@@?@?@@@@@@@?@?\u0015@@?@o@@@@@@@@@?z?@a?a?\u0015"
]
}
}
Something to notice with the community module is that when the shell is sh we don't see the ansible-core message:
[DEPRECATION WARNING]: Non UTF-8 encoded data replaced with "?" while displaying text to stdout/stderr, this is temporary and will become an error. This feature will be removed
in version 2.18. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
Where when the shell is zsh we do, which hints at this is somewhere in ansible-core and how the python STDOUT is getting handled.
Is there an existing issue for this?
Documentation issue description
The playbook repository today touches on how Rocket bash is not supported, with our new support matrix we do mention the z/OS shell is what is supported but we don't clearly explain that other shells are not (well not tested against).
With z/OS 3.1 and the inclusion of Open Enterprise Foundation for z/OS (OEF), we now have 4 shells:
bash
,sh
,tcsh
andzsh
We should be more definitive in the support docs on what is not supported; over time we can relax the requirements but to achieve z/OS 3.1 support, we should focus on what has worked for us,
/bin/sh
.Docs: /bin/sh /bin/zsh /bin/tcsh
The products position will be to continue to only stand behind the default
/bin/sh
shell, all others will be unsupported. Only a fewibm_zos_core
modules were tested with z/OS 3.1/bin/zsh
and worked fine, community modules such ascommand
andshell
failed to return readable stdout even when paired withiconv
.IBM z/OS Ansible core Version
v1.9.0 (default)
Ansible module
No response