paloaltonetworks.panos.panos_facts (2.19.1) — module

Collects facts from PAN-OS devices

| "added in version" 1.0.0 of paloaltonetworks.panos"

Authors: Tomi Raittinen (@traittinen), Garfield Lee Freeman (@shinmog), Michael Richardson (@mrichardson03)

Install collection

Install with ansible-galaxy collection install paloaltonetworks.panos:==2.19.1


Add to requirements.yml

  collections:
    - name: paloaltonetworks.panos
      version: 2.19.1

Description

Collects fact information from Palo Alto Networks firewalls and Panorama.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Gather facts
- name: Get facts
  paloaltonetworks.panos.panos_facts:
    provider: '{{ provider }}'
    gather_subset: ['config']

Inputs

    
port:
    default: 443
    description:
    - B(Deprecated)
    - Use I(provider) to specify PAN-OS connectivity instead.
    - HORIZONTALLINE
    - The port number to connect to the PAN-OS device on.
    type: int

api_key:
    description:
    - B(Deprecated)
    - Use I(provider) to specify PAN-OS connectivity instead.
    - HORIZONTALLINE
    - The API key to use instead of generating it using I(username) / I(password).
    type: str

password:
    description:
    - B(Deprecated)
    - Use I(provider) to specify PAN-OS connectivity instead.
    - HORIZONTALLINE
    - The password to use for authentication.  This is ignored if I(api_key) is specified.
    type: str

provider:
    description:
    - A dict object containing connection details.
    suboptions:
      api_key:
        description:
        - The API key to use instead of generating it using I(username) / I(password).
        type: str
      ip_address:
        description:
        - The IP address or hostname of the PAN-OS device being configured.
        type: str
      password:
        description:
        - The password to use for authentication.  This is ignored if I(api_key) is specified.
        type: str
      port:
        default: 443
        description:
        - The port number to connect to the PAN-OS device on.
        type: int
      serial_number:
        description:
        - The serial number of a firewall to use for targeted commands. If I(ip_address)
          is not a Panorama PAN-OS device, then this param is ignored.
        type: str
      username:
        default: admin
        description:
        - The username to use for authentication.  This is ignored if I(api_key) is specified.
        type: str
    type: dict
    version_added: 1.0.0
    version_added_collection: paloaltonetworks.panos

username:
    default: admin
    description:
    - B(Deprecated)
    - Use I(provider) to specify PAN-OS connectivity instead.
    - HORIZONTALLINE
    - The username to use for authentication.  This is ignored if I(api_key) is specified.
    type: str

ip_address:
    description:
    - B(Deprecated)
    - Use I(provider) to specify PAN-OS connectivity instead.
    - HORIZONTALLINE
    - The IP address or hostname of the PAN-OS device being configured.
    type: str

gather_subset:
    default:
    - '!config'
    description:
    - 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.
    elements: str
    required: false
    type: list

Outputs

ansible_net_config:
  description: Device confiration in XML format.
  returned: When C(config) is specified in C(gather_subset).
  type: str
ansible_net_full_commit_required:
  description: Specifies whether full commit is required to apply changes.
  returned: When C(system) is specified in C(gather_subset).
  type: bool
ansible_net_ha_enabled:
  description: Specifies whether HA is enabled or not.
  returned: When C(ha) is specified in C(gather_subset).
  type: bool
ansible_net_ha_localmode:
  description: Specifies the HA mode on local node.
  returned: When C(ha) is specified in C(gather_subset).
  sample: Active-Passive
  type: str
ansible_net_ha_localstate:
  description: Specifies the HA state on local node.
  returned: When C(ha) is specified in C(gather_subset).
  sample: active
  type: str
ansible_net_hostname:
  description: Hostname of the local node.
  returned: When C(system) is specified in C(gather_subset).
  type: str
ansible_net_interfaces:
  contains:
    comment:
      description: Interface description/comment.
      type: str
    ip:
      description: List of interface IP addresses in CIDR format.
      sample: 192.0.2.1/24
      type: list
    ipv6:
      description: List of interface IPv6 addresses in CIDR format.
      sample: 2001:db8::0000:1/64
      type: list
    name:
      description: Interface name.
      sample: ae1.23
      type: str
    tag:
      description: VLAN tag for the subinterface.
      sample: 23
      type: int
  description: Network interface information.
  returned: When C(interface) is specified in C(gather_subset).
  type: complex
ansible_net_kbps:
  description: Current kb/s throughput.
  returned: When C(session) is specified in C(gather_subset).
  type: int
ansible_net_model:
  description: Device model of the local node.
  returned: When C(system) is specified in C(gather_subset).
  type: str
ansible_net_multivsys:
  description: Specifies whether multivsys mode is enabled on local node.
  returned: When C(system) is specified in C(gather_subset).
  sample: true
  type: str
ansible_net_pps:
  description: Current packets/s throughput.
  returned: When C(session) is specified in C(gather_subset).
  type: int
ansible_net_routing_table:
  contains:
    age:
      description: Age of the route entry in the routing table.
      type: str
    destination:
      description: IP prefix of the destination.
      type: str
    flags:
      description: Flags for the route entry in the routing table.
      type: str
    interface:
      description: Egress interface the router will use to reach the next hop.
      type: str
    metric:
      description: Metric for the route.
      type: str
    nexthop:
      description: Address of the device at the next hop toward the destination network.
      type: str
    route_table:
      description: Unicast or multicast route table.
      type: str
    virtual_router:
      description: Virtual router the route belongs to.
      type: str
  description: Routing Table information.
  returned: When C(routing) is specified in C(gather_subset).
  type: complex
ansible_net_serial:
  description: Serial number of the local node.
  returned: When C(system) is specified in C(gather_subset).
  type: str
ansible_net_session_max:
  description: Maximum number of sessions on local node.
  returned: When C(session) is specified in C(gather_subset).
  type: int
ansible_net_session_usage:
  description: Current number of active sessions on local node
  returned: When C(session) is specified in C(gather_subset).
  type: int
ansible_net_uncommitted_changes:
  description: Specifies if commit is required to apply changes.
  returned: When C(system) is specified in C(gather_subset).
  type: bool
ansible_net_uptime:
  description: Uptime of the local node.
  returned: When C(system) is specified in C(gather_subset).
  sample: 469 days, 19:30:16
  type: str
ansible_net_version:
  description: PanOS version of the local node.
  returned: When C(system) is specified in C(gather_subset).
  type: str
ansible_net_virtual_routers:
  contains:
    vr_asn:
      description: BGP autonomous system number.
      sample: 65001
      type: int
    vr_iflist:
      description: List interfaces in the VR.
      sample:
      - ae2.12
      - ae2.14
      type: list
    vr_name:
      description: Name of the virtual router.
      type: str
    vr_routerid:
      description: BGP router ID.
      sample: 192.0.2.1
      type: str
  description: Virtual Router information.
  returned: When C(vr) is specified in C(gather_subset).
  type: complex
ansible_net_virtual_systems:
  contains:
    vsys_currentsessions:
      description: Number of active sessions on VSYS.
      type: int
    vsys_description:
      description: VSYS description/name.
      type: str
    vsys_id:
      description: VSYS ID.
      type: int
    vsys_iflist:
      description: List of interfaces attached to the VSYS.
      type: list
    vsys_name:
      description: VSYS name.
      sample: vsys1
      type: int
    vsys_vrlist:
      description: List of virtual routers attached to the VSYS.
      type: list
    vsys_vsys_maxsessions:
      description: Number of configured maximum sessions on VSYS. 0 for unlimited.
      type: int
    vsys_zonelist:
      description: List of security zones attached to the VSYS.
      type: list
  description: Virtual System information.
  returned: When C(vsys) is specified in C(gather_subset).
  type: complex