paloaltonetworks.panos.panos_facts module – Collects facts from PAN-OS devices

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_facts.

New in paloaltonetworks.panos 1.0.0

Synopsis

  • Collects fact information from Palo Alto Networks firewalls and Panorama.

Requirements

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

  • pan-python

Parameters

Parameter

Comments

api_key

string

Deprecated

Use provider to specify PAN-OS connectivity instead.


The API key to use instead of generating it using username / password.

gather_subset

list / elements=string

Scopes what information is gathered from the device. Possible values for this argument include all, system, session, interfaces, ha, routing, vr, vsys and config. You can specify a list of values to include a larger subset. Values can also be used with an initial ! to specify that a specific subset should not be collected. Panorama only supports the system, ha, and config subsets.

Default: :ansible-option-default:`["!config"]`

ip_address

string

Deprecated

Use provider to specify PAN-OS connectivity instead.


The IP address or hostname of the PAN-OS device being configured.

password

string

Deprecated

Use provider to specify PAN-OS connectivity instead.


The password to use for authentication. This is ignored if api_key is specified.

port

integer

Deprecated

Use provider to specify PAN-OS connectivity instead.


The port number to connect to the PAN-OS device on.

Default: :ansible-option-default:`443`

provider

dictionary

added in paloaltonetworks.panos 1.0.0

A dict object containing connection details.

api_key

string

The API key to use instead of generating it using username / password.

ip_address

string

The IP address or hostname of the PAN-OS device being configured.

password

string

The password to use for authentication. This is ignored if api_key is specified.

port

integer

The port number to connect to the PAN-OS device on.

Default: :ansible-option-default:`443`

serial_number

string

The serial number of a firewall to use for targeted commands. If ip_address is not a Panorama PAN-OS device, then this param is ignored.

username

string

The username to use for authentication. This is ignored if api_key is specified.

Default: :ansible-option-default:`"admin"`

username

string

Deprecated

Use provider to specify PAN-OS connectivity instead.


The username to use for authentication. This is ignored if api_key is specified.

Default: :ansible-option-default:`"admin"`

Notes

Note

  • Checkmode is not supported.

  • PAN-OS connectivity should be specified using provider or the classic PAN-OS connectivity params (ip_address, username, password, api_key, and port). If both are present, then the classic params are ignored.

Examples

# Gather facts
- name: Get facts
  paloaltonetworks.panos.panos_facts:
    provider: '{{ provider }}'
    gather_subset: ['config']

Return Values

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

Key

Description

ansible_net_config

string

Device confiration in XML format.

Returned: When config is specified in gather_subset.

ansible_net_full_commit_required

boolean

Specifies whether full commit is required to apply changes.

Returned: When system is specified in gather_subset.

ansible_net_ha_enabled

boolean

Specifies whether HA is enabled or not.

Returned: When ha is specified in gather_subset.

ansible_net_ha_localmode

string

Specifies the HA mode on local node.

Returned: When ha is specified in gather_subset.

Sample: :ansible-rv-sample-value:`"Active-Passive"`

ansible_net_ha_localstate

string

Specifies the HA state on local node.

Returned: When ha is specified in gather_subset.

Sample: :ansible-rv-sample-value:`"active"`

ansible_net_hostname

string

Hostname of the local node.

Returned: When system is specified in gather_subset.

ansible_net_interfaces

complex

Network interface information.

Returned: When interface is specified in gather_subset.

comment

string

Interface description/comment.

Returned: success

ip

list / elements=string

List of interface IP addresses in CIDR format.

Returned: success

Sample: :ansible-rv-sample-value:`["192.0.2.1/24"]`

ipv6

list / elements=string

List of interface IPv6 addresses in CIDR format.

Returned: success

Sample: :ansible-rv-sample-value:`["2001:db8::0000:1/64"]`

name

string

Interface name.

Returned: success

Sample: :ansible-rv-sample-value:`"ae1.23"`

tag

integer

VLAN tag for the subinterface.

Returned: success

Sample: :ansible-rv-sample-value:`23`

ansible_net_kbps

integer

Current kb/s throughput.

Returned: When session is specified in gather_subset.

ansible_net_model

string

Device model of the local node.

Returned: When system is specified in gather_subset.

ansible_net_multivsys

string

Specifies whether multivsys mode is enabled on local node.

Returned: When system is specified in gather_subset.

Sample: :ansible-rv-sample-value:`"True"`

ansible_net_pps

integer

Current packets/s throughput.

Returned: When session is specified in gather_subset.

ansible_net_routing_table

complex

Routing Table information.

Returned: When routing is specified in gather_subset.

age

string

Age of the route entry in the routing table.

Returned: success

destination

string

IP prefix of the destination.

Returned: success

flags

string

Flags for the route entry in the routing table.

Returned: success

interface

string

Egress interface the router will use to reach the next hop.

Returned: success

metric

string

Metric for the route.

Returned: success

nexthop

string

Address of the device at the next hop toward the destination network.

Returned: success

route_table

string

Unicast or multicast route table.

Returned: success

virtual_router

string

Virtual router the route belongs to.

Returned: success

ansible_net_serial

string

Serial number of the local node.

Returned: When system is specified in gather_subset.

ansible_net_session_max

integer

Maximum number of sessions on local node.

Returned: When session is specified in gather_subset.

ansible_net_session_usage

integer

Current number of active sessions on local node

Returned: When session is specified in gather_subset.

ansible_net_uncommitted_changes

boolean

Specifies if commit is required to apply changes.

Returned: When system is specified in gather_subset.

ansible_net_uptime

string

Uptime of the local node.

Returned: When system is specified in gather_subset.

Sample: :ansible-rv-sample-value:`"469 days, 19:30:16"`

ansible_net_version

string

PanOS version of the local node.

Returned: When system is specified in gather_subset.

ansible_net_virtual_routers

complex

Virtual Router information.

Returned: When vr is specified in gather_subset.

vr_asn

integer

BGP autonomous system number.

Returned: success

Sample: :ansible-rv-sample-value:`65001`

vr_iflist

list / elements=string

List interfaces in the VR.

Returned: success

Sample: :ansible-rv-sample-value:`["ae2.12", "ae2.14"]`

vr_name

string

Name of the virtual router.

Returned: success

vr_routerid

string

BGP router ID.

Returned: success

Sample: :ansible-rv-sample-value:`"192.0.2.1"`

ansible_net_virtual_systems

complex

Virtual System information.

Returned: When vsys is specified in gather_subset.

vsys_currentsessions

integer

Number of active sessions on VSYS.

Returned: success

vsys_description

string

VSYS description/name.

Returned: success

vsys_id

integer

VSYS ID.

Returned: success

vsys_iflist

list / elements=string

List of interfaces attached to the VSYS.

Returned: success

vsys_name

integer

VSYS name.

Returned: success

Sample: :ansible-rv-sample-value:`"vsys1"`

vsys_vrlist

list / elements=string

List of virtual routers attached to the VSYS.

Returned: success

vsys_vsys_maxsessions

integer

Number of configured maximum sessions on VSYS. 0 for unlimited.

Returned: success

vsys_zonelist

list / elements=string

List of security zones attached to the VSYS.

Returned: success

Authors

  • Tomi Raittinen (@traittinen)

  • Garfield Lee Freeman (@shinmog)

  • Michael Richardson (@mrichardson03)