Deprecated

Removed in 2.0.0

i

Reason:Consolidating code base. | Alternative:Use U(https://galaxy.ansible.com/PaloAltoNetworks/paloaltonetworks) instead.

community.network.panos_op (1.3.7) — module

execute arbitrary OP commands on PANW devices (e.g. show interface all)

Authors: Ivan Bojer (@ivanbojer)

Install collection

Install with ansible-galaxy collection install community.network:==1.3.7


Add to requirements.yml

  collections:
    - name: community.network
      version: 1.3.7

Description

This module will allow user to pass and execute any supported OP command on the PANW device.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Show list of all interfaces
  community.network.panos_op:
    ip_address: '{{ ip_address }}'
    username: '{{ username }}'
    password: '{{ password }}'
    cmd: 'show interfaces all'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Show system info
  community.network.panos_op:
    ip_address: '{{ ip_address }}'
    username: '{{ username }}'
    password: '{{ password }}'
    cmd: 'show system info'

Inputs

    
cmd:
    description:
    - The OP command to be performed.
    required: true

api_key:
    description:
    - API key that can be used instead of I(username)/I(password) credentials.

password:
    description:
    - Password credentials to use for authentication.
    required: true

username:
    default: admin
    description:
    - Username credentials to use for authentication.
    required: false

ip_address:
    description:
    - IP address (or hostname) of PAN-OS device or Panorama management console being configured.
    required: true

Outputs

stdout:
  description: output of the given OP command as JSON formatted string
  returned: success
  sample: '{system: {app-release-date: 2017/05/01  15:09:12}}'
  type: str
stdout_xml:
  description: output of the given OP command as JSON formatted string
  returned: success
  sample: <response status=success><result><system><hostname>fw2</hostname>
  type: str