I created a playbook to do shelf firmware updates, but it keeps failing and says the host is unreachable. But the debug output clearly shows that it connected to the ONTAP cluster via ssh and then tried to run a bourne shell instead of using a zapi or rest call:
<72.32.19.224> ESTABLISH SSH CONNECTION FOR USER: myuser
<72.32.19.224> SSH: EXEC sshpass -d8 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'User="myuser"' -o ConnectTimeout=10 -o ControlPath=/home/john0839/.ansible/cp/e15ac7f1e5 72.32.19.224 '/bin/sh -c '"'"'echo ~myuser && sleep 0'"'"''
<72.32.19.224> (255, '\r\r\nLast login time: 7/17/2023 11:38:14\r\r\nUnsuccessful login attempts since last login: 2\r\r\n\x07\r\nError: "/bin/sh" is not a recognized command\r\n\r\n', '')
fatal: [c-1645000-954872-lab]: UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: ",
"unreachable": true
The playbook is a very simple shelf fw update (sorry, indention is lost with a paste):
---
- hosts: all
gather_facts: false
collections:
- netapp.ontap
name: ONTAP shelf firmware upgrade
tasks:
- name: shelf firmware upgrade
na_ontap_firmware_upgrade:
state: present
firmware _type: shelf
package_url: "{{ 'http://mirror.somedomain.com/storagecenter/NetApp/AllPlatforms/all_shelf_fw_16MAY2023.zip' }}"
hostname: "{{ inventory_hostname }}"
username: "{{ ansible_user }}"
password: "{{ ansible_password }}"
https: true
validate_certs: false