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

Who Me Too'd this topic

Ansible panos_type_cmd | send arbitrary command to firewall via Panorama

L0 Member

Hello,

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

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

tasks:
  - name: Show management IP.
    paloaltonetworks.panos.panos_type_cmd:
       provider: '{{ provider }}'
       cmd: 'show'
       xpath: |
          /config/devices/entry[@name='localhost.localdomain']
          /deviceconfig/system/ip-address
    register: response
  - debug: msg="{{ response.stdout }}"

 

This playbook works when connected to firewall itself.

Thank you in advance.

Who Me Too'd this topic