Ansible - unable to add new firewall to Panorama

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Please sign in to see details of an important advisory in our Customer Advisories area.

Ansible - unable to add new firewall to Panorama

L0 Member

Any suggestions here is much appreciated. Brand new firewall built in AWS- I am able to interact with the firewall with ansible using the paloalto role - the only thing that is giving me fits is setting the primary panorama server IP. 


Here is my (abbreviated) playbook


--- # Initial config
- hosts: panos
  connection: local
  gather_facts: False

    - role: paloaltonetworks.paloaltonetworks

      username: '{{ username }}'
      password: '{{ password }}'
      ip_address: '{{ inventory_hostname }}'

    - name: Grab the credentials from ansible-vault
      include_vars: firewall-secrets.yml
      no_log: 'yes'

    - name: MgtConfig
        provider: '{{ pafw }}'
        dns_server_primary: ""
        dns_server_secondary: ""
        ntp_server_primary: ""
        ntp_server_secondary: ""
        timezone: "US/Eastern"
        panorama_primary: ""
        commit: True


But when I run the playbook, I get an API error


    "msg": "Failed to update panorama: Could not get schema node for xpath /config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/panorama-server\n"

L5 Sessionator

Update the pandevice python library.  PAN-OS 9.1 has changed the locations for the primary and secondary panorama server IP addresses, and the more recent version of pandevice has the new xpath locations.

Thanks for the suggestion - I have updated with PIP, but this has still not resulted in success. 

L1 Bithead

I have the same exact issue. I have the latest pandevice python library installed. My Palo Alto firewall is on release 10.0.4 and ansible version 2.9.10

L1 Bithead

Actually, I found the issue. I did not have pan-os-python installed.

pip install pan-os-python

  • 4 replies
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!