Ansible - unable to add new firewall to Panorama

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

  roles:
    - role: paloaltonetworks.paloaltonetworks

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

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

    - name: MgtConfig
      panos_mgtconfig:
        provider: '{{ pafw }}'
        dns_server_primary: "8.8.8.8"
        dns_server_secondary: "4.4.4.4"
        ntp_server_primary: "0.us.pool.ntp.org"
        ntp_server_secondary: "1.us.pool.ntp.org"
        timezone: "US/Eastern"
        panorama_primary: "128.0.0.1"
        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"
4 REPLIES 4

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

  • 4234 Views
  • 4 replies
  • 0 Likes
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!