Panos_admpwd Hangs #272
-
Hi there, I have a super basic Ansible script that is meant to just change the admin password using SSH. It should be mentioned that this is for a GCP VM-Series firewall. ---
- 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 }}' and my inventory.yml: all:
hosts:
children:
firewall:
hosts:
morannon:
ansible_host: xx.xxx.xx.xxx
ansible_user: admin
ansible_ssh_private_key_file: ssh.key
provider:
ip_address: xx.xxx.xx.xxx
new_password: new_password and for whatever reason, the task just hangs when establishing the connection.
I did find this fixed issue that is exactly my problem, but it was fixed and leaving the connection ongoing never actually errors out or ends. Here's my
I realize this may not be "the place" to ask this, but the LIVEcommunity doesn't seem as active as I need it to be, so I figured this is the second best place I could find. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You need to be using
|
Beta Was this translation helpful? Give feedback.
You need to be using
connection: local
so that the module executes on your system locally, instead of doing the typical Ansible method of copying and executing Python code over SSH. Here's an example that I just tried: