Deprecated

Removed in 2.12

i

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

community.general.panos_op (0.1.1) — module

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

Authors: Ivan Bojer (@ivanbojer)

deprecated | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

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