<?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 Panos_admpwd Hangs in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-admpwd-hangs/m-p/437052#M2793</link>
    <description>&lt;P&gt;Hi there, I have a super basic Ansible script that is meant to just change the admin password using SSH.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;---
- name: change admin password for newly deployed Palo Alto firewall
  hosts: firewall
  collections:
    - paloaltonetworks.panos
  gather_facts: no
  
  tasks:
    - name: Change admin password using SSH
      panos_admpwd:
        ip_address: '{{ provider.ip_address }}'
        newpassword: '{{ provider.new_password }}'
        key_filename: '{{ ansible_ssh_private_key_file }}'
      register: result
      until: not result|failed
      retries: 10
      delay: 30

    - name: panos commit
      panos_commit_firewall:
        provider: '{{ provider }}'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and for whatever reason, the task just hangs when establishing the connection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TASK [Change admin password using SSH] **************************************************************************************************************************************************************************************************************************************************************************************************************************
task path: /home/dapper/Morannon/Ansible/morannon.yml:9
&amp;lt;xx.xxx.xx.xxx&amp;gt; ESTABLISH SSH CONNECTION FOR USER: admin
&amp;lt;xx.xxx.xx.xxx&amp;gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="ssh.key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="admin"' -o ConnectTimeout=10 -o ControlPath=/home/dapper/.ansible/cp/52255bf5c1 xxx.xxx.xx.xxx '/bin/sh -c '"'"'echo ~admin &amp;amp;&amp;amp; sleep 0'"'"''&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did find an issue on the GitHub where this exact thing was happening, but it was supposedly fixed.&lt;/P&gt;&lt;P&gt;This is my ansible version:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ansible [core 2.11.5] 
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/dapper/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/dapper/.local/lib/python3.8/site-packages/ansible
  ansible collection location = /home/dapper/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/dapper/.local/bin/ansible
  python version = 3.8.0 (default, Feb 25 2021, 22:10:10) [GCC 8.4.0]
  jinja version = 3.0.1
  libyaml = True&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Sep 2021 22:41:10 GMT</pubDate>
    <dc:creator>Dapper</dc:creator>
    <dc:date>2021-09-27T22:41:10Z</dc:date>
    <item>
      <title>Panos_admpwd Hangs</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-admpwd-hangs/m-p/437052#M2793</link>
      <description>&lt;P&gt;Hi there, I have a super basic Ansible script that is meant to just change the admin password using SSH.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;---
- name: change admin password for newly deployed Palo Alto firewall
  hosts: firewall
  collections:
    - paloaltonetworks.panos
  gather_facts: no
  
  tasks:
    - name: Change admin password using SSH
      panos_admpwd:
        ip_address: '{{ provider.ip_address }}'
        newpassword: '{{ provider.new_password }}'
        key_filename: '{{ ansible_ssh_private_key_file }}'
      register: result
      until: not result|failed
      retries: 10
      delay: 30

    - name: panos commit
      panos_commit_firewall:
        provider: '{{ provider }}'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and for whatever reason, the task just hangs when establishing the connection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TASK [Change admin password using SSH] **************************************************************************************************************************************************************************************************************************************************************************************************************************
task path: /home/dapper/Morannon/Ansible/morannon.yml:9
&amp;lt;xx.xxx.xx.xxx&amp;gt; ESTABLISH SSH CONNECTION FOR USER: admin
&amp;lt;xx.xxx.xx.xxx&amp;gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="ssh.key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="admin"' -o ConnectTimeout=10 -o ControlPath=/home/dapper/.ansible/cp/52255bf5c1 xxx.xxx.xx.xxx '/bin/sh -c '"'"'echo ~admin &amp;amp;&amp;amp; sleep 0'"'"''&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did find an issue on the GitHub where this exact thing was happening, but it was supposedly fixed.&lt;/P&gt;&lt;P&gt;This is my ansible version:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ansible [core 2.11.5] 
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/dapper/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/dapper/.local/lib/python3.8/site-packages/ansible
  ansible collection location = /home/dapper/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/dapper/.local/bin/ansible
  python version = 3.8.0 (default, Feb 25 2021, 22:10:10) [GCC 8.4.0]
  jinja version = 3.0.1
  libyaml = True&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 22:41:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-admpwd-hangs/m-p/437052#M2793</guid>
      <dc:creator>Dapper</dc:creator>
      <dc:date>2021-09-27T22:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Panos_admpwd Hangs</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-admpwd-hangs/m-p/438218#M2802</link>
      <description>&lt;P&gt;Per the reply from MR on&amp;nbsp;&lt;A href="https://github.com/PaloAltoNetworks/pan-os-ansible/discussions/272," target="_blank"&gt;https://github.com/PaloAltoNetworks/pan-os-ansible/discussions/272,&lt;/A&gt;&amp;nbsp;connection should be local. There is a repo of example playbooks here that might be useful for you:&amp;nbsp;&lt;A href="https://github.com/PaloAltoNetworks/ansible-playbooks" target="_blank"&gt;https://github.com/PaloAltoNetworks/ansible-playbooks&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2021 11:02:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-admpwd-hangs/m-p/438218#M2802</guid>
      <dc:creator>JimmyHolland</dc:creator>
      <dc:date>2021-10-02T11:02:44Z</dc:date>
    </item>
  </channel>
</rss>

