Ansible - unable to add new firewall to Panorama

Reply
L0 Member

Ansible - unable to add new firewall to Panorama

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"
L4 Transporter

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.

L0 Member

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

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!