ansible-collections / ibm_zos_core

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

[Epic] [community] [code] Identify remaining community modules for compatibility with z/OS #1431

Open ketankelkar opened 3 months ago

ketankelkar commented 3 months ago

Primarily due to the differences in the base environmental assumptions of z/OS UNIX and other popular distributed platforms, the Ansible community code yields sub-optimal results in certain scenarios when used with a z/OS managed node.

Initial investigations identified ansible.builtin.lineinfile and ansible.builtin.blockinfile as community modules which did not work as expected for destination files encoded in EBCDIC. The underlying issue was that the module logic opened the files in read-binary mode (open('rb')). This approach works for files on managed nodes on popular distributed platforms because they tend to operate in UTF-8 only, so either a file is binary, or it is UTF-8 encoded text. For z/OS, there is a third option, EBCDIC encoded text files, which went un-addressed in the community modules mentioned above. There are mechanisms which convert non-UTF-8 encoded files to UTF-8, but those mechanisms are only triggered when file read/writes happen in text mode (open('r') or open('rt')).

Explore the remaining Ansible community modules and identify areas where compatibility for z/OS UNIX managed nodes can be improved/increased.

See also:

Also create new work items for any newly identified modules.