- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
01-18-2021 11:40 AM
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.
02-11-2021 03:32 PM
Have to specify device_group? Default is 'shared' which likely will not work as expected
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!