paloaltonetworks.panos.panos_nat_rule_facts module – Get information about a NAT rule.
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_nat_rule_facts
.
New in paloaltonetworks.panos 1.0.0
DEPRECATED
- Removed in:
version 3.0.0
- Why:
Updating module design to network resource modules.
- Alternative:
Use paloaltonetworks.panos.panos_nat_rule2 with state=gathered.
Synopsis
Get information about one or more NAT rules.
Requirements
The below requirements are needed on the host that executes this module.
pan-python
pandevice
Parameters
Parameter |
Comments |
---|---|
Deprecated Use provider to specify PAN-OS connectivity instead. The API key to use instead of generating it using username / password. |
|
(Panorama only) The device group the operation should target. Default: :ansible-option-default:`"shared"` |
|
Deprecated Use provider to specify PAN-OS connectivity instead. The IP address or hostname of the PAN-OS device being configured. |
|
Return all rules. Mutually exclusive with rule_name, rule_regex, and uuid. Choices: |
|
Deprecated Use provider to specify PAN-OS connectivity instead. The password to use for authentication. This is ignored if api_key is specified. |
|
Deprecated Use provider to specify PAN-OS connectivity instead. The port number to connect to the PAN-OS device on. Default: :ansible-option-default:`443` |
|
A dict object containing connection details. |
|
The API key to use instead of generating it using username / password. |
|
The IP address or hostname of the PAN-OS device being configured. |
|
The password to use for authentication. This is ignored if api_key is specified. |
|
The port number to connect to the PAN-OS device on. Default: :ansible-option-default:`443` |
|
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. |
|
The username to use for authentication. This is ignored if api_key is specified. Default: :ansible-option-default:`"admin"` |
|
Name of the rule. Mutually exclusive with rule_regex, listing, and uuid. |
|
A regex to match against the rule name. Mutually exclusive with rule_name, listing, and uuid. |
|
The rulebase in which the rule is to exist. If left unspecified, this defaults to rulebase=pre-rulebase for Panorama. For NGFW, this is always set to be rulebase=rulebase. Choices: |
|
Deprecated Use provider to specify PAN-OS connectivity instead. The username to use for authentication. This is ignored if api_key is specified. Default: :ansible-option-default:`"admin"` |
|
Match the given rule UUID (PAN-OS 9.0+). Mutually exclusive with rule_name, listing, and rule_regex. |
|
The vsys this object belongs to. Default: :ansible-option-default:`"vsys1"` |
Notes
Note
Checkmode is not supported.
Panorama is supported.
PAN-OS connectivity should be specified using provider or the classic PAN-OS connectivity params (ip_address, username, password, api_key, and port). If both are present, then the classic params are ignored.
Examples
- name: Get a list of all NAT rules
paloaltonetworks.panos.panos_nat_rule_facts:
provider: '{{ provider }}'
listing: true
register: res1
- debug:
msg: '{{ res1.listing }}'
- name: Get the NAT rule foo
paloaltonetworks.panos.panos_nat_rule_facts:
provider: '{{ provider }}'
rule_name: 'foo'
register: res2
- debug:
msg: '{{ res2.object }}'
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
List of rules Returned: When listing or rule_regex is set |
|
Single rule definition Returned: When rule_name or uuid is specified |
|
Description Returned: success |
|
Destination addresses Returned: success |
|
To zones Returned: success |
|
Destination NAT translated address Returned: success |
|
Destination NAT translated port Returned: success |
|
The NAT type Returned: success |
|
Rule name Returned: success |
|
The service Returned: success |
|
Type of source translation Returned: success |
|
Bidirectional flag Returned: success |
|
Source NAT translated address Returned: success |
|
Source NAT interface Returned: success |
|
SNAT interface address Returned: success |
|
Static IP SNAT translated address Returned: success |
|
Type of source translation Returned: success |
|
Source addresses Returned: success |
|
Source zone Returned: success |
|
Administrative tags for this rule Returned: success |
|
Egress interface from route lookup Returned: success |
|
The UUID of the rule (PAN-OS 9.0+) Returned: success |
Status
This module will be removed in version 3.0.0. [deprecated]
For more information see DEPRECATED.