community.network.panos_nat_rule – create a policy NAT rule

From Get docs
Ansible/docs/2.10/collections/community/network/panos nat rule module


community.network.panos_nat_rule – create a policy NAT rule

Note

This plugin is part of the community.network collection (version 1.3.0).

To install it use: ansible-galaxy collection install community.network.

To use it in a playbook, specify: community.network.panos_nat_rule.


DEPRECATED

Removed in
version 2.0.0
Why
Consolidating code base.
Alternative
Use https://galaxy.ansible.com/PaloAltoNetworks/paloaltonetworks instead.

Synopsis

  • ** Create a policy nat rule. Keep in mind that we can either end up configuring source NAT, destination NAT, or both. Instead of splitting it into two we will make a fair attempt to determine which one the user wants.

Requirements

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

Parameters

Parameter Choices/Defaults Comments

api_key

string

API key that can be used instead of username/password credentials.

commit

boolean

  • no
  • yes

Commit configuration if changed.

description

string

The description

destination_ip

string

Default:

["any"]

list of destination addresses

destination_zone

string / required

destination zone

devicegroup

string

If Panorama, the device group to put this rule in.

dnat_address

string

dnat translated address

dnat_port

string

dnat translated port

ip_address

string / required

IP address (or hostname) of PAN-OS device being configured.

operation

string / required

  • add
  • update
  • delete
  • find

The action to be taken. Supported values are add/update/find/delete.

password

string / required

Password credentials to use for auth unless api_key is set.

rule_name

string / required

name of the SNAT rule

service

string

Default:

"any"

service

snat_address_type

string

  • interface-address

  • translated-address

type of source translation. Supported values are translated-address/translated-address.

snat_bidirectional

boolean

  • no

  • yes

bidirectional flag

snat_dynamic_address

string

Source NAT translated address. Used with Dynamic-IP and Dynamic-IP-and-Port.

snat_interface

string

snat interface

snat_interface_address

string

snat interface address

snat_static_address

string

Source NAT translated address. Used with Static-IP translation.

snat_type

string

  • static-ip
  • dynamic-ip-and-port
  • dynamic-ip

type of source translation

source_ip

string

Default:

["any"]

list of source addresses

source_zone

string / required

list of source zones

tag_name

string

Tag for the NAT rule.

to_interface

string

Default:

"any"

Destination interface.

username

string

Default:

"admin"

Username credentials to use for auth unless api_key is set.



Notes

Note

  • Checkmode is not supported.
  • Panorama is supported.


Examples

# Create a source and destination nat rule
  - name: Create NAT SSH rule for 10.0.1.101
    community.network.panos_nat_rule:
      ip_address: '{{ ip_address }}'
      username: '{{ username }}'
      password: '{{ password }}'
      rule_name: "Web SSH"
      source_zone: ["external"]
      destination_zone: "external"
      source: ["any"]
      destination: ["10.0.0.100"]
      service: "service-tcp-221"
      snat_type: "dynamic-ip-and-port"
      snat_interface: "ethernet1/2"
      dnat_address: "10.0.1.101"
      dnat_port: "22"

Status

  • This module will be removed in version 2.0.0. [deprecated]
  • For more information see DEPRECATED.

Authors

  • Luigi Mori (@jtschichold), Ivan Bojer (@ivanbojer), Robert Hagen (@rnh556)

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/network/panos_nat_rule_module.html