Connecting to F5 using SSH via Ansible
I am in the process of writing a playbook which uses SSH to connect to F5 and run a bash command (ntpdate -d time_server) to confirm NTP connectivity across the environment. For SSH I am using root. Here is the task that I have in the playbook.
- name: "Check NTP on {{override_host}}"
vars:
ansible_connection: ssh
ansible_user: "root"
ansible_password: "{{root_pwd}}"
ansible_ssh_private_key_file: "~/.ssh/f5-ansible-ssh"
command:
cmd: ntpdate -d {{item}}
loop: "{{new_ntp_servers}}"
register: ntp_status
The error message that I get is as follows
MSG:
The module failed to execute correctly, you probably need to set the interpreter.
See stdout/stderr for the exact error
MODULE_STDOUT:
/bin/sh: /usr/local/bin/python3.9: No such file or directory
MODULE_STDERR:
******************************* IMPORTANT NOTE ******************************
Banner
*****************************************************************************
Shared connection to ltm closed.
Any help would be greatly appreciated...