ansible.builtin.panos_op (v2.7.18) — module

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

| "added in version" 2.5 of ansible.builtin"

Authors: Ivan Bojer (@ivanbojer)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.7.18

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