paloaltonetworks.panos.panos_snapshot_report module – Generates a report by comparing two snapshot made with the paloaltonetworks.panos.panos_state_snapshot module.

Note

This module is part of the paloaltonetworks.panos collection (version 2.19.1).

To install it, use: ansible-galaxy collection install paloaltonetworks.panos. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: paloaltonetworks.panos.panos_snapshot_report.

New in paloaltonetworks.panos 2.18.0

Synopsis

  • A wrapper around the PAN-OS Upgrade Assurance package.

  • This is an ‘offline’ module, meaning it operates only on available facts. It does not need to connect to a device. It’s a wrapper around the SnapshotCompare class.

  • The module takes two snapshots made with paloaltonetworks.panos.panos_state_snapshot module, compares them and produces a report in a form of a dict. Keys in this report match the state areas, values contain comparison details.

  • You can limit the report to the state area’s you’re only interested in. You can also adjust the comparison by excluding some or limiting to particular properties.

  • Please refer to package’s documentation for syntax and configuration dialect.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter

Comments

left_snapshot

dictionary / required

One of the snapshots to compare. It can be any snapshot taken in any time, but normally, in an upgrade scenario, you would think about it as the pre-upgrade snapshot.

reports

list / elements=any

A list of Firewall state areas available in both snapshots: left_snapshot and right_snapshot.

To use the default comparison method, this is a list of strings. If you would like to modify the default behavior additional configuration can be specified per state area.

For a list of currently available state areas as well as possible ways of modifying the reports please refer to package documentation.

To capture the actual report use a register.

Default: :ansible-option-default:`["all"]`

right_snapshot

dictionary / required

One of the snapshots to compare. It can be any snapshot taken in any time, but normally, in an upgrade scenario, you would think about it as the post-upgrade snapshot.

Notes

Note

  • This is an offline module, no device connection is made.

  • Check mode is not supported.

Examples

- name: Compare licenses in two snapshots, skip device's serial number to avoid false-positives
  panos_snapshot_report:
    left_snapshot: '{{ snap_1.response }}'
    right_snapshot: '{{ snap_2.response }}'
    reports:
      - license:
          properties:
            - '!serial'
    register: report
- name: Print the report to stdout
  ansible.builtin.debug:
    var: report.response

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

response

dictionary

Authors

  • Łukasz Pawlęga (@fosix)