ansible-collections / ibm_zos_core

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

[Epic] [community] [code] Add z/OS compatibility - ansible.builtin.blockinfile #1430

Open ketankelkar opened 3 months ago

ketankelkar commented 3 months ago

The `ansible.builtin.blockinfile module does not currently support file operations for files not encoded in UTF-8. This means that the module does not work for files encoded in EBCDIC. There is a mechanism available which automatically converts non-UTF-8 encoded files to UTF-8, but only when those target files are treated as text files (eg open('r') or open('rt')). The file conversion is not triggered if the target file is treated as binary (as is the case in today's community code)

link to src code

This epic tracks the effort to change the community code to inspect a z/OS UNIX file's extended attributes for tags (encoding info) and successfully execute the intended file operation.

The ansible.builtin.blockinfile module processes target files the same way as the ansible.builtin.lineinfile module. See the ansible.builtin.lineinfile epic:

The items in this epic: