ssh problem ( ansible with pfsense )

Hello Everyone,
i got this problem when i try to connect ssh Ansible → PfSense:

ansible all -m ping
x.x.x.x | FAILED! => {
“changed”: false,
“module_stderr”: “Shared connection to x.x.x.x closed.\r\n”,
“module_stdout”: “/bin/sh: /usr/bin/python: not found\r\n”,
“msg”: “The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error”,
“rc”: 127
}

and python3 was installed in Ansible Master:

which python3

/usr/bin/python3

Hii,

“master” isn’t really a concept in the ansible world - there is usually one “control node” and one or more “managed nodes”.

From your post I assume you installed python3 on the control node.
That is good, but the error is from your managed node, which does not have a python executable.
But, a quick google search reveals that pfSense requires you to explicitly say which version, i.e. python3.8.
If that is the case, you should configure that in your inventory:

https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html#using-python-3-on-the-managed-machines-with-commands-and-playbooks