Ansible panos_type_cmd | send arbitrary command to firewall via Panorama

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

Ansible panos_type_cmd | send arbitrary command to firewall via Panorama

L0 Member


I tried to get information from firewall via Panorama using Ansible panos_type_cmd module. But in response I see: "msg": "******** not connected".

Could you someone advise how to debug this or check the correctness of playbook:


- hosts: Panorama
  connection: local
  gather_facts: no

        ip_address: '{{ "Panorama IP" }}'
        username: xxx
        password: yyy
        serial_number: "SN OF END FIREWALL"
     ansible_python_interpreter: /usr/bin/python3.6

  - name: Show management IP.
       provider: '{{ provider }}'
       cmd: 'show'
       xpath: |
    register: response
  - debug: msg="{{ response.stdout }}"


This playbook works when connected to firewall itself.

Thank you in advance.


L0 Member

Have to specify device_group?  Default is 'shared' which likely will not work as expected

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!