Gather facts failed to execute on target(Redhat)

37 views
Skip to first unread message

rajtheco...@gmail.com

unread,
Jul 17, 2023, 6:29:28 AM7/17/23
to Ansible Development
Hi Team,

One of the server encountered the below issue while executing setup module, Can anyone help ?

 OS:  redhat-release-5Server-5.11.0.9

Error message:

  "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "module_stderr": "OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 17281\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\nShared connection to test1.lab.net closed.\r\n",
    "module_stdout": "  File \"/var/lib/ansible/.ansible/tmp/ansible-tmp-1689584397.189888-17274-87468472332769/AnsiballZ_setup.py\", line 72\r\n    with open(args_path, 'rb') as f:\r\n            ^\r\nSyntaxError: invalid syntax\r\n",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",


Thanks

Andreas Härpfer

unread,
Jul 17, 2023, 9:29:05 AM7/17/23
to rajtheco...@gmail.com


> On 17. Jul 2023, at 12:29, rajtheco...@gmail.com <rajtheco...@gmail.com> wrote:
>
> Hi Team,
>
> One of the server encountered the below issue while executing setup module, Can anyone help ?
>
> OS: redhat-release-5Server-5.11.0.9


*Cough* … RHEL 5 … seriously!? That's prehistoric and even extended life
cycle support for this release has ended in Nov 2020!

Regarding the technical reason for your error: AFAIK RHEL 5 comes with
Python 2.4; Ansible requires at least Python 2.6 on a managed node; see

https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#managed-node-requirements

for details.

Cheers
-Andi

Andreas Härpfer

unread,
Jul 17, 2023, 9:29:18 AM7/17/23
to rajtheco...@gmail.com

> Regarding the technical reason for your error: AFAIK RHEL 5 comes with
> Python 2.4; Ansible requires at least Python 2.6 on a managed node; see

Minor correction … the above was the requirement for Ansible 2.9, the
latest Ansible version even requires Python 2.7.

rajtheco...@gmail.com

unread,
Jul 18, 2023, 2:18:59 AM7/18/23
to Ansible Development
Thank you Andi !!! 
Reply all
Reply to author
Forward
0 new messages