f5networks.f5_modules.bigip_dns_zone (1.28.0) — module

Manage DNS zones on BIG-IP

| "added in version" 1.0.0 of f5networks.f5_modules"

Authors: Tim Rupp (@caphrim007), Greg Crosby (@crosbygw)

Install collection

Install with ansible-galaxy collection install f5networks.f5_modules:==1.28.0


Add to requirements.yml

  collections:
    - name: f5networks.f5_modules
      version: 1.28.0

Description

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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a DNS zone for DNS express
  bigip_dns_zone:
    name: zone.foo.com
    dns_express:
      enabled: true
      server: dns-lab
      allow_notify_from:
        - 192.168.39.10
      notify_action: consume
      verify_tsig: false
      response_policy: false
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Disable DNS express zone, change server, and modify notify_action to bypass
  bigip_dns_zone:
    name: zone.foo.com
    dns_express:
      enabled: false
      server: foo1.server.com
      allow_notify_from:
        - 192.168.39.10
      notify_action: bypass
      verify_tsig: false
      response_policy: false
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove zone
  bigip_dns_zone:
    name: zone.foo.com
    state: absent
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

Inputs

    
name:
    description:
    - Specifies the name of the DNS zone.
    - The name must begin with a letter and contain only letters, numbers, and the underscore
      character.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - When C(present), ensures the resource exists.
    - When C(absent), ensures the resource is removed.
    type: str

provider:
    description:
    - A dict object containing connection details.
    suboptions:
      auth_provider:
        description:
        - Configures the auth provider for to obtain authentication tokens from the remote
          device.
        - This option is really used when working with BIG-IQ devices.
        type: str
      no_f5_teem:
        default: false
        description:
        - If C(yes), TEEM telemetry data is not sent to F5.
        - You may omit this option by setting the environment variable C(F5_TELEMETRY_OFF).
        - Previously used variable C(F5_TEEM) is deprecated as its name was confusing.
        type: bool
      password:
        aliases:
        - pass
        - pwd
        description:
        - 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 C(F5_PASSWORD).
        required: true
        type: str
      server:
        description:
        - The BIG-IP host or the BIG-IQ host.
        - You may omit this option by setting the environment variable C(F5_SERVER).
        required: true
        type: str
      server_port:
        default: 443
        description:
        - The BIG-IP server port.
        - You may omit this option by setting the environment variable C(F5_SERVER_PORT).
        type: int
      timeout:
        description:
        - 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.
        type: int
      transport:
        choices:
        - rest
        default: rest
        description:
        - Configures the transport connection to use when connecting to the remote device.
        type: str
      user:
        description:
        - 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 C(F5_USER).
        required: true
        type: str
      validate_certs:
        default: true
        description:
        - If C(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 C(F5_VALIDATE_CERTS).
        type: bool
    type: dict
    version_added: 1.0.0
    version_added_collection: f5networks.f5_modules

partition:
    default: Common
    description:
    - Device partition to manage resources on.
    type: str

dns_express:
    description:
    - DNS express related settings.
    suboptions:
      allow_notify_from:
        description:
        - Specifies the IP addresses from which the system accepts NOTIFY messages for
          this DNS Express zone.
        elements: str
        type: list
      enabled:
        description:
        - Specifies the current status of the DNS Express zone.
        type: bool
      notify_action:
        choices:
        - consume
        - bypass
        - repeat
        description:
        - 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
          C(consume) and C(repeat) actions.
        - When C(consume), the NOTIFY message is seen only by DNS Express.
        - When C(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 C(repeat), the NOTIFY message goes to both DNS Express and any back-end
          DNS server.
        type: str
      response_policy:
        description:
        - Specifies whether this DNS Express zone is a DNS response policy zone (RPZ).
        type: bool
      server:
        description:
        - Specifies the back-end authoritative DNS server from which the BIG-IP system
          receives AXFR zone transfers for the DNS Express zone.
        type: str
      verify_tsig:
        description:
        - Specifies whether the system verifies the identity of the authoritative nameserver
          that sends updated information for this DNS Express zone.
        type: bool
    type: dict

nameservers:
    description:
    - Specifies the DNS nameservers to which the system sends NOTIFY messages.
    elements: str
    type: list

tsig_server_key:
    description:
    - 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.
    type: str

Outputs

allow_notify_from:
  description: The new DNS Express Allow NOTIFY From value.
  returned: changed
  sample:
  - 1.1.1.1
  - 2.2.2.2
  type: list
enabled:
  description: Whether the zone is enabled or not.
  returned: changed
  sample: true
  type: bool
express_server:
  description: The new DNS Express Server value.
  returned: changed
  sample: server1
  type: str
nameservers:
  description: The new Zone Transfer Clients Nameservers value.
  returned: changed
  sample:
  - /Common/server1
  - /Common/server2
  type: list
notify_action:
  description: The new DNS Express Notify Action value.
  returned: changed
  sample: consume
  type: str
response_policy:
  description: The new DNS Express Response Policy value.
  returned: changed
  sample: false
  type: bool
tsig_server_key:
  description: The new TSIG Server Key value.
  returned: changed
  sample: /Common/key1
  type: str
verify_tsig:
  description: The new DNS Express Verify Notify TSIG value.
  returned: changed
  sample: true
  type: bool