<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ansible makes ssh connection instead of zapi/rest in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ansible-makes-ssh-connection-instead-of-zapi-rest/m-p/445972#M3266</link>
    <description>&lt;P&gt;I found this thread indicating that I have to specify the cluster in the playbook and can't use an inventory file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Ansible-Ontap-not-reachable-when-running-the-playbooks/td-p/437640" target="_blank"&gt;https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Ansible-Ontap-not-reachable-when-running-the-playbooks/td-p/437640&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This defeats the purpose of using ansible to manage a large environment.&amp;nbsp; And this post indicates that an inventory file CAN be used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://netapp.io/2019/07/17/running-a-playbook-against-multiple-ontap-clusters/" target="_blank"&gt;https://netapp.io/2019/07/17/running-a-playbook-against-multiple-ontap-clusters/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jul 2023 18:59:25 GMT</pubDate>
    <dc:creator>jhelms</dc:creator>
    <dc:date>2023-07-17T18:59:25Z</dc:date>
    <item>
      <title>ansible makes ssh connection instead of zapi/rest</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ansible-makes-ssh-connection-instead-of-zapi-rest/m-p/445966#M3265</link>
      <description>&lt;P&gt;I created a playbook to do shelf firmware updates, but it keeps failing and says the host is unreachable.&amp;nbsp; 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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;72.32.19.224&amp;gt; ESTABLISH SSH CONNECTION FOR USER: myuser&lt;BR /&gt;&amp;lt;72.32.19.224&amp;gt; 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 &amp;amp;&amp;amp; sleep 0'"'"''&lt;BR /&gt;&amp;lt;72.32.19.224&amp;gt; (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', '')&lt;BR /&gt;fatal: [c-1645000-954872-lab]: UNREACHABLE! =&amp;gt; {&lt;BR /&gt;"changed": false,&lt;BR /&gt;"msg": "Failed to connect to the host via ssh: ",&lt;BR /&gt;"unreachable": true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The playbook is a very simple shelf fw update (sorry, indention is lost with a paste):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: all&lt;BR /&gt;gather_facts: false&lt;BR /&gt;collections:&lt;BR /&gt;- netapp.ontap&lt;BR /&gt;name: ONTAP shelf firmware upgrade&lt;BR /&gt;tasks:&lt;BR /&gt;- name: shelf firmware upgrade&lt;BR /&gt;na_ontap_firmware_upgrade:&lt;BR /&gt;state: present&lt;BR /&gt;firmware _type: shelf&lt;BR /&gt;package_url: "{{ '&lt;A href="http://mirror.somedomain.com/storagecenter/NetApp/AllPlatforms/all_shelf_fw_16MAY2023.zip" target="_blank"&gt;http://mirror.somedomain.com/storagecenter/NetApp/AllPlatforms/all_shelf_fw_16MAY2023.zip&lt;/A&gt;' }}"&lt;BR /&gt;hostname: "{{ inventory_hostname }}"&lt;BR /&gt;username: "{{ ansible_user }}"&lt;BR /&gt;password: "{{ ansible_password }}"&lt;BR /&gt;https: true&lt;BR /&gt;validate_certs: false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 09:47:05 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ansible-makes-ssh-connection-instead-of-zapi-rest/m-p/445966#M3265</guid>
      <dc:creator>jhelms</dc:creator>
      <dc:date>2025-06-04T09:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: ansible makes ssh connection instead of zapi/rest</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ansible-makes-ssh-connection-instead-of-zapi-rest/m-p/445972#M3266</link>
      <description>&lt;P&gt;I found this thread indicating that I have to specify the cluster in the playbook and can't use an inventory file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Ansible-Ontap-not-reachable-when-running-the-playbooks/td-p/437640" target="_blank"&gt;https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/Ansible-Ontap-not-reachable-when-running-the-playbooks/td-p/437640&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This defeats the purpose of using ansible to manage a large environment.&amp;nbsp; And this post indicates that an inventory file CAN be used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://netapp.io/2019/07/17/running-a-playbook-against-multiple-ontap-clusters/" target="_blank"&gt;https://netapp.io/2019/07/17/running-a-playbook-against-multiple-ontap-clusters/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 18:59:25 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ansible-makes-ssh-connection-instead-of-zapi-rest/m-p/445972#M3266</guid>
      <dc:creator>jhelms</dc:creator>
      <dc:date>2023-07-17T18:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: ansible makes ssh connection instead of zapi/rest</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ansible-makes-ssh-connection-instead-of-zapi-rest/m-p/445973#M3267</link>
      <description>&lt;P&gt;Looks like I left out one very important line in the playbook:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;connection: local&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"The solution is the task option “connection: local” along with an inventory file containing your cluster names."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many thanks to David Blackwell, wherever he is now.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;John&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 19:05:10 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/ansible-makes-ssh-connection-instead-of-zapi-rest/m-p/445973#M3267</guid>
      <dc:creator>jhelms</dc:creator>
      <dc:date>2023-07-17T19:05:10Z</dc:date>
    </item>
  </channel>
</rss>

