### Summary

I have a role that hasn't been changed recently and still works correctly on most hosts (CentOS, Oracle Linux en Suse).
This role, if it detects a Redhat, will call ansible.builtin.yum
And this has always worked .. until suddenly one Oracle Linux 7.9 hosts fails this task with the error: "Error: Module unable to decode valid JSON on stdin.  Unable to figure out what parameters were passed"

```
TASK [zabbix-agent : Install package zabbix_agent2] ****************************
fatal: [xxx]: FAILED! => {"changed": false, "msg": "Error: Module unable to decode valid JSON on stdin.  Unable to figure out what parameters were passed"}
```

In the system logging of that host I see no problems, and I see the parameters parsed just fine for as far as I understand it:

```
Jul  7 17:39:20 xxx ansible-ansible.legacy.yum: Invoked with name=['zabbix-agent2'] state=latest update_cache=True enablerepo=['\\*zabbix\\*'] allow_downgrade=False autoremove=False bugfix=False cacheonly=False disable_gpg_check=False disable_plugin=[] disablerepo=[] download_only=False enable_plugin=[] exclude=[] installroot=/ install_repoquery=True install_weak_deps=True security=False skip_broken=False update_only=False validate_certs=True sslverify=True lock_timeout=30 use_backend=auto conf_file=None disable_excludes=None download_dir=None list=None releasever=None
```
I don't see this problem on other Oracle Linux or CentOS hosts. I have no clue on how to debug this? Or what could be the cause for this ?

### Issue Type

Bug Report

### Component Name

yum

### Ansible Version

```console
$ ansible --version
ansible [core 2.15.0]
  config file = None
  configured module search path = ['/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
  ansible collection location = /runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.9.16 (main, Dec  8 2022, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
```


### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CONFIG_FILE() = None
```


### OS / Environment

NAME="Oracle Linux Server"
VERSION="7.9"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Oracle Linux Server 7.9"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:9:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.9
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.9


### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: Install package {{ zbx_agent_generation }}
  become: true
  ansible.builtin.yum:
    name: "{{ __zbx_agent_packages[zbx_agent_generation] }}"
    state: latest
    update_cache: true
    enablerepo: "\\*zabbix\\*"
  retries: 3
  notify: restart zabbix-agent
```


### Expected Results

The requested package to be installed

### Actual Results

```console
<xxx> ESTABLISH SSH CONNECTION FOR USER: ops
<xxx> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ops"' -o ConnectTimeout=10 -o 'ControlPath="/runner/cp/28b2e02311"' -tt xxx '/bin/sh -c '"'"'sudo -H -S -n  -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-cceddylaroytysqkptljeuuefrajsuvd ; /usr/bin/python3.6 /home/ops/.ansible/tmp/ansible-tmp-1688745858.7127638-451-200846650582138/AnsiballZ_yum.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<xxx> (1, b'\r\n{"msg": "Error: Module unable to decode valid JSON on stdin.  Unable to figure out what parameters were passed", "failed": true}\r\n', b'Shared connection to xxx closed.\r\n')
<xxx> Failed to connect to the host via ssh: Shared connection to xxx closed.
<xxx> ESTABLISH SSH CONNECTION FOR USER: ops
<xxx> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ops"' -o ConnectTimeout=10 -o 'ControlPath="/runner/cp/28b2e02311"' xxx '/bin/sh -c '"'"'rm -f -r /home/ops/.ansible/tmp/ansible-tmp-1688745858.7127638-451-200846650582138/ > /dev/null 2>&1 && sleep 0'"'"''
<xxx> (0, b'', b'')
fatal: [xxx]: FAILED! => {
    "changed": false,
    "msg": "Error: Module unable to decode valid JSON on stdin.  Unable to figure out what parameters were passed"
}
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
if prev_mode is None:
            prev_mode = stat.S_IMODE(path_stat.st_mode)
        is_directory = stat.S_ISDIR(path_stat.st_mode)
        has_x_permissions = (prev_mode & EXEC_PERM_BITS) > 0
        apply_X_permission = is_directory or has_x_permissions
        
        
        
        umask = os.umask(0)
        os.umask(umask)
        rev_umask = umask ^ PERM_BITS
        
        
        if apply_X_permission:
            X_perms = {
                'u': {'X': stat.S_IXUSR},
                'g': {'X': stat.S_IXGRP},
                'o': {'X': stat.S_IXOTH},
            }
        else:
            X_perms = {
                'u': {'X': 0},
                'g': {'X': 0},
                'o': {'X': 0},
            }
        user_perms_to_modes = {
            'u': {
                'r': rev_umask & stat.S_IRUSR if use_umask else stat.S_IRUSR,