Unknown platform when using ansible on fortigate
ansible [core 2.15.13]
python version = 3.9.18
fortigate running 7.6.2
Installed the latest fortios collection in ansible.
When ever I run a simple playbook I get the following:
[root@fm02-proxy02a ansible]# ansible -i hosts all -m ping
[WARNING]: Unhandled error in Python interpreter discovery for host us2fgt1.example.net: unexpected output from Python interpreter discovery
[WARNING]: Platform unknown on host us2fgt1.example.net is using the discovered Python interpreter at /usr/bin/python, but future installation of another
Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-core/2.15/reference_appendices/interpreter_discovery.html for
more information.
us2fgt1.exmaple.net | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"module_stderr": "",
"module_stdout": "us2fgt1 # Unknown action 0\n\nus2fgt1 # ",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 0
}
I am trying to use ssh with an ssh key to access the fortigate. From the command line I can ssh to the fortigate with the ssh key just fine. So why is ansible having difficulties? Is it because ansible cannot find python on the fortigate and does not know what to do at this point? I have this same error if I do a ping or try to use one of the fortios collections do something on the fortigate.
