Ansible Play book execution was failed with Error "Error: : Task failed: Action failed: Module result deserialization failed: No start of json char found"

Jaganmohanaraos24
Sat, 31 Jan 2026 13:42:32 +0000
Get Help

Give a clear explanation (and steps to reproduce the issue where possible)

I am try to install webspehere application on RHEL 10 managed host from Ansible control node hosted on Ubuntu 24.04. I am triggering workflow using github and installing ansible on github runner with ubuntu 24.04 and preparing runner to connect rhel 10 manged host ( aws ec2 instance) using iamra.
But workflow was failed. To test I am executing simple playbook to check ping status of the RHEL 10 managed host but workflow failed with error “Error: : Task failed: Action failed: Module result deserialization failed: No start of json char found”. Evan gather_facts also failing. PLease help me in solving this issue.

Version details for ubuntu runner and ansible version installed on Ubuntu and python verion on RHEL 10 managed hosts given below.

Include the version(s) of the relevant software tools, libraries, collections etc

Runner Image
Image: ubuntu-24.04
Version: 20260126.10.1

Run ansible --version
ansible [core 2.20.2]
config file = None
configured module search path = [‘/home/runner/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/ansible
ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/hostedtoolcache/Python/3.12.12/x64/bin/ansible
python version = 3.12.12 (main, Oct 10 2025, 01:01:16) [GCC 13.3.0] (/opt/hostedtoolcache/Python/3.12.12/x64/bin/python)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)

RHEL 10 Managed host
Python version installed is 3.12

Some of the variables defined are given below.

Settings used for aws_ssm module / connectivity

ansible_connection: aws_ssm
ansible_aws_ssm_bucket_name: “{{ lookup(‘env’, ‘ANSIBLE_S3_BUCKET’) }}”
ansible_aws_ssm_region: “{{ lookup(‘env’, ‘AWS_REGION’) }}”
#ansible_aws_ssm_access_key_id: “{{ lookup(‘env’, ‘AWS_ACCESS_KEY_ID’) }}”
#ansible_aws_ssm_secret_access_key: “{{ lookup(‘env’, ‘AWS_SECRET_ACCESS_KEY’) }}”
ansible_aws_ssm_bucket_sse_mode: “aws:kms”
ansible_python_interpreter: /usr/bin/python3
ansible_aws_ssm_timeout: 1900

my code!

- name: Install WAS  checking
  hosts: ec2-uat-ansible-automation
  #hosts: ec2-uat-was-websrv-1
  gather_facts: no
  become: true
  become_method: sudo
# become_user: svc-mw-was9spn@awsemea.com
  #become_flags: "-E"
  vars:
    # ansible_become_flags: -H -S -n
      become_flags: -H -S -n
   # ansible_shell_type: bash
   # ansible_shell_executable: /bin/bash

  tasks:
    - name: Check ping
      become_user: svc-mw-was9spn@awsemea.com
      ansible.builtin.command: pwd
      register: dir_out

    - name: Display ping output
      debug:
        msg: "{{ dir_out.stdout }}"


When i chenged gather_facts to yes, workflow/playbook failed dwith the following code.

Error: : Task failed: Action failed: The following modules failed to execute: ansible.legacy.setup.



-

1 post - 1 participant