paloaltonetworks.panos.panos_template_variable module – Manage template or template stack variable

Note

This module is part of the paloaltonetworks.panos collection (version 2.21.2).

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

New in paloaltonetworks.panos 2.8.0

Synopsis

  • Manage a template or template stack variable on Panorama.

Requirements

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

Parameters

Parameter

Comments

gathered_filter

string

When state=gathered.

An advanced filtering option to filter results returned from PAN-OS.

Refer to the guide discussing gathered_filter for more information.

name

string

Name of the variable.

Variable names should start with the dollar sign.

provider

dictionary / required

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

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

state

string

template

string

(Panorama only) The template this operation should target. Mutually exclusive with template_stack.

template_stack

string

(Panorama only) The template stack this operation should target. Mutually exclusive with template.

value

string

The variable value.

variable_type

string

Notes

Note

  • Panorama is supported.

  • This is a Panorama only module.

  • Check mode is supported.

  • If the PAN-OS to be configured is Panorama, either template or template_stack must be specified.

Examples

# Create a template variable.
- name: create template variable
  paloaltonetworks.panos.panos_template_variable:
    provider: '{{ provider }}'
    template: 'tmpl name'
    name: '$ip1'
    value: '192.168.1.1'
    variable_type: 'ip-netmask'

# Create a fqdn template stack variable
- name: create fqdn template stack variable
  paloaltonetworks.panos.panos_template_variable:
    name: '$fqdn1'
    value: 'example.com'
    variable_type: 'fqdn'

Authors

  • Garfield Lee Freeman (@shinmog)