f5networks.f5_modules.bigip_gtm_dns_listener module – Configures the BIG-IP DNS system to answer TCP or UDP DNS requests
Note
This module is part of the f5networks.f5_modules collection (version 1.30.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install f5networks.f5_modules
.
To use it in a playbook, specify: f5networks.f5_modules.bigip_gtm_dns_listener
.
New in f5networks.f5_modules 1.4.0
Synopsis
Defines one or more Listener objects to control which protocols are available for the BIG-IP DNS system to process DNS requests.
BIG-IP DNS Listeners allow TCP and UDP protocols.
Parameters
Parameter |
Comments |
---|---|
Specifies the IP address on which the system listens. |
|
Specifies whether this Listener’s address is advertised to surrounding routers. Choices:
|
|
Specifies whether to automatically map the last hop for pools or not. |
|
Provides a brief description for DNS Listener. |
|
List of VLANs to be disabled. If the partition is not specified in the VLAN, then the This parameter is mutually exclusive with the |
|
List of VLANs to be enabled. When a VLAN named This parameter is mutually exclusive with the |
|
Specifies a fallback persistence profile for the Listener to use when the default persistence profile is not available. |
|
Specifies the protocol on which this Listener receives network traffic. |
|
Specifies list of iRules to run on the Listener. iRules help automate the intercepting, processing, and routing of application traffic. If you want to remove existing iRules, provide an empty list value; |
|
Specifies the name of the last hop pool that you want the Listener to use to direct reply traffic to the last hop router. |
|
Specifies the netmask for a network Listener only. Netmask clarifies whether the host bit is an actual zero or a wildcard representation. |
|
Specifies the name of the DNS Listener. |
|
Device partition to manage resources on. Default: |
|
Specifies a default pool to which the Listener automatically directs traffic. |
|
Specifies the port on which the Listener listens for connections. Valid range of values is between |
|
A dict object containing connection details. |
|
Configures the auth provider for to obtain authentication tokens from the remote device. This option is really used when working with BIG-IQ devices. |
|
If You may omit this option by setting the environment variable Previously used variable Choices:
|
|
The password for the user account used to connect to the BIG-IP or the BIG-IQ. You may omit this option by setting the environment variable |
|
The BIG-IP host or the BIG-IQ host. You may omit this option by setting the environment variable |
|
The BIG-IP server port. You may omit this option by setting the environment variable Default: |
|
Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|
Configures the transport connection to use when connecting to the remote device. Choices:
|
|
The username to connect to the BIG-IP or the BIG-IQ. This user must have administrative privileges on the device. You may omit this option by setting the environment variable |
|
If You may omit this option by setting the environment variable Choices:
|
|
Specifies whether the system preserves the source port of the connection. |
|
DNS Listener state. When When When Choices:
|
|
Enables or disables address translation for the Listener. Choices:
|
|
Enables or disables port translation. Choices:
|
Notes
Note
For more information on using Ansible to manage F5 Networks devices see https://www.ansible.com/integrations/networks/f5.
Requires BIG-IP software version >= 12.
The F5 modules only manipulate the running configuration of the F5 product. To ensure that BIG-IP specific configuration persists to disk, be sure to include at least one task that uses the f5networks.f5_modules.bigip_config module to save the running configuration. Refer to the module’s documentation for the correct usage of the module to save your running configuration.
Examples
- name: 'Create DNS Listener'
bigip_gtm_dns_listener:
address: '192.0.1.0'
advertise: false
auto_lasthop: default
description: 'this is a test DNS listener'
enabled_vlans:
- /Common/external
ip_protocol: tcp
irules:
- /Common/irule1
mask: '255.255.255.0'
pool: /Common/webpool
name: test-dns-listener
port: 30025
provider:
password: secret
server: lb.mydomain.com
user: admin
source_port: preserve
state: present
translate_address: true
translate_port: true
delegate_to: localhost
- name: 'Disable a DNS Listener'
bigip_gtm_dns_listener:
address: '192.0.1.0'
state: disabled
name: test-dns-listener
provider:
password: secret
server: lb.mydomain.com
user: admin
delegate_to: localhost
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
IP address on which the system listens. Returned: changed Sample: |
|
Specifies if the Listener advertises to surrounding routers. Returned: changed Sample: |
|
Shows whether the system automatically maps the last hop for pools. Returned: changed Sample: |
|
List of VLANs the virtual is disabled for. Returned: changed Sample: |
|
Provides DNS Listener state. Returned: changed Sample: |
|
List of VLANs the virtual is enabled for. Returned: changed Sample: |
|
Fallback persistence profile for the Listener to use when the default persistence profile is not available. Returned: changed Sample: |
|
IP protocol used by the DNS Listener. Returned: changed Sample: |
|
List of rules run by the DNS Listener. Returned: changed Sample: |
|
Subnet mask used by the Listener to identify address range. Returned: changed Sample: |
|
DNS Listener name. Returned: changed Sample: |
|
Port on which the system listens. Returned: changed Sample: |
|
Specifies if system preserves the source port of the connection. Returned: changed Sample: |
|
Specifies if address translation is enabled. Returned: changed Sample: |
|
Specifies if port translation is enabled. Returned: changed Sample: |