W3cubDocs

/Ansible 2.10

f5networks.f5_modules.bigip_dns_zone – Manage DNS zones on BIG-IP

Note

This plugin is part of the f5networks.f5_modules collection.

To install it use: ansible-galaxy collection install f5networks.f5_modules.

To use it in a playbook, specify: f5networks.f5_modules.bigip_dns_zone.

New in version 1.0.0: of f5networks.f5_modules

Synopsis

  • Manage DNS zones on BIG-IP. The zones managed here are primarily used for configuring DNS Express on a BIG-IP. This module does not configure zones that are found in BIG-IP ZoneRunner.

Parameters

Parameter Choices/Defaults Comments
dns_express
dictionary
DNS express related settings.
allow_notify_from
list / elements=string
Specifies the IP addresses from which the system accepts NOTIFY messages for this DNS Express zone.
enabled
boolean
    Choices:
  • no
  • yes
Specifies the current status of the DNS Express zone.
notify_action
string
    Choices:
  • consume
  • bypass
  • repeat
Specifies the action the system takes when a NOTIFY message is received for this DNS Express zone.
If a TSIG key is configured for the zone, the signature is only validated for consume and repeat actions.
When consume, the NOTIFY message is seen only by DNS Express.
When bypass, the NOTIFY message does not go to DNS Express, but instead goes to a back-end DNS server (subject to the value of the Unhandled Query Action configured in the DNS profile applied to the listener that handles the DNS request).
When repeat, the NOTIFY message goes to both DNS Express and any back-end DNS server.
response_policy
boolean
    Choices:
  • no
  • yes
Specifies whether this DNS Express zone is a DNS response policy zone (RPZ).
server
string
Specifies the back-end authoritative DNS server from which the BIG-IP system receives AXFR zone transfers for the DNS Express zone.
verify_tsig
boolean
    Choices:
  • no
  • yes
Specifies whether the system verifies the identity of the authoritative nameserver that sends updated information for this DNS Express zone.
name
string / required
Specifies the name of the DNS zone.
The name must begin with a letter and contain only letters, numbers, and the underscore character.
nameservers
list / elements=string
Specifies the DNS nameservers to which the system sends NOTIFY messages.
partition
string
Default:
"Common"
Device partition to manage resources on.
provider
dictionary
added in 1.0.0 of f5networks.f5_modules
A dict object containing connection details.
auth_provider
string
Configures the auth provider for to obtain authentication tokens from the remote device.
This option is really used when working with BIG-IQ devices.
no_f5_teem
boolean
    Choices:
  • no
  • yes
If yes, TEEM telemetry data is not sent to F5.
You may omit this option by setting the environment variable F5_TEEM.
password
string / required
The password for the user account used to connect to the BIG-IP.
You may omit this option by setting the environment variable F5_PASSWORD.

aliases: pass, pwd
server
string / required
The BIG-IP host.
You may omit this option by setting the environment variable F5_SERVER.
server_port
integer
Default:
443
The BIG-IP server port.
You may omit this option by setting the environment variable F5_SERVER_PORT.
timeout
integer
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.
transport
string
    Choices:
  • rest
Configures the transport connection to use when connecting to the remote device.
user
string / required
The username to connect to the BIG-IP with. This user must have administrative privileges on the device.
You may omit this option by setting the environment variable F5_USER.
validate_certs
boolean
    Choices:
  • no
  • yes
If no, SSL certificates are not validated. Use this only on personally controlled sites using self-signed certificates.
You may omit this option by setting the environment variable F5_VALIDATE_CERTS.
state
string
    Choices:
  • present
  • absent
When present, ensures the resource exists.
When absent, ensures the resource is removed.
tsig_server_key
string
Specifies the TSIG key the system uses to authenticate the back-end DNS authoritative server that sends AXFR zone transfers to the BIG-IP system.

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 a DNS zone for DNS express
  bigip_dns_zone:
    name: zone.foo.com
    dns_express:
      enabled: yes
      server: dns-lab
      allow_notify_from:
        - 192.168.39.10
      notify_action: consume
      verify_tsig: no
      response_policy: no
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Disable DNS express zone, change server, and modify notify_action to bypass
  bigip_dns_zone:
    name: zone.foo.com
    dns_express:
      enabled: no
      server: foo1.server.com
      allow_notify_from:
        - 192.168.39.10
      notify_action: bypass
      verify_tsig: no
      response_policy: no
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Add nameservers
  bigip_dns_zone:
    name: zone.foo.com
    nameservers:
      - foo1.nameserver.com
      - foo2.nameserver.com
      - foo3.nameserver.com
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Remove nameserver
  bigip_dns_zone:
    name: zone.foo.com
    nameservers:
      - foo1.nameserver.com
      - foo2.nameserver.com
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Remove all nameservers
  bigip_dns_zone:
    name: zone.foo.com
    nameservers: none
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Add tsig_server_key
  bigip_dns_zone:
    name: zone.foo.com
    tsig_server_key: key1
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Remove tsig_server_key
  bigip_dns_zone:
    name: zone.foo.com
    tsig_server_key: none
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Remove zone
  bigip_dns_zone:
    name: zone.foo.com
    state: absent
    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 Returned Description
allow_notify_from
list / elements=string
changed
The new DNS Express Allow NOTIFY From value.

Sample:
['1.1.1.1', '2.2.2.2']
enabled
boolean
changed
Whether the zone is enabled or not.

Sample:
True
express_server
string
changed
The new DNS Express Server value.

Sample:
server1
nameservers
list / elements=string
changed
The new Zone Transfer Clients Nameservers value.

Sample:
['/Common/server1', '/Common/server2']
notify_action
string
changed
The new DNS Express Notify Action value.

Sample:
consume
response_policy
boolean
changed
The new DNS Express Response Policy value.

tsig_server_key
string
changed
The new TSIG Server Key value.

Sample:
/Common/key1
verify_tsig
boolean
changed
The new DNS Express Verify Notify TSIG value.

Sample:
True


Authors

  • Tim Rupp (@caphrim007)
  • Greg Crosby (@crosbygw)

© 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/f5networks/f5_modules/bigip_dns_zone_module.html