After editing the inventory file, when we get to the ansible all -i inventory -m ping command. We see the following errors:
[WARNING]: Host 'DA' is using the discovered Python interpreter at '/usr/bin/python3', but future installation of another Python interpreter could cause a different interpreter to be discovered. See https://docs.ansible.com/ansible-core/2.19/reference_appendices/interpreter_discovery.html for more information.
[WARNING]: sftp transfer mechanism failed on [xxx.xx.xxx.xxx]. Use ANSIBLE_DEBUG=1 to see detailed information
[ERROR]: Task failed: Action failed: Module result deserialization failed: No start of json char found
Task failed: Action failed.
Origin: <adhoc 'ping' task>
{'action': 'ping', 'args': {}, 'timeout': 0, 'async_val': 0, 'poll': 15}
<<< caused by >>>
Module result deserialization failed: No start of json char found See stdout/stderr for the returned output.
DA | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
},
"changed": false,
"module_stderr": "Shared connection to 172.28.156.111 closed.\r\n",
"module_stdout": " File \"/home1/topology/.ansible/tmp/ansible-tmp-1761071559.6304965-3914603-40975257409292/AnsiballZ_ping.py\", line 3\r\n from __future__ import annotations\r\n ^\r\nSyntaxError: future feature annotations is not defined\r\n",
"msg": "Module result deserialization failed: No start of json char found",
"rc": 1
}
Interpreter Discovery — Ansible Core Documentation
Dx NetOps Topology 24.3.102
Wrong version of Python installed
Note: If things are working as expected you may see 'Warnings'
Example:
[WARNING]: Host 'xxxx' is using the discovered Python interpreter at '/usr/bin/python3.12', but future installation of another Python interpreter could cause a different interpreter to be discovered. See https://docs.ansible.com/ansible-core/2.19/reference_appendices/interpreter_discovery.html for more information.
PMTS | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_
},
"changed": false,
"ping": "pong"
This indicates everything is working as expected.
Our documentation clearly outlines these prerequisites on the “Install and Configure Ansible” page: https://techdocs.broadcom.com/