bigip_profile_dns – Manage DNS profiles on a BIG-IP — Ansible Documentation

- AnsibleFest
- Products
- Community
- Webinars & Training
- Blog

Documentation

# bigip_profile_dns – Manage DNS profiles on a BIG-IP

New in version 2.6.

- Synopsis
- Parameters
- Notes
- Examples
- Return Values
- Status

## Synopsis

- Manage DNS profiles on a BIG-IP. Many DNS profiles; each with their own adjustments to the standard `dns` profile. Users of this module should be aware that many of the adjustable knobs have no module default. Instead, the default is assigned by the BIG-IP system itself which, in most cases, is acceptable.

## Parameters

Parameter | Choices/Defaults | Comments
--- | --- | ---
cache_name string added in 2.7 |  | Specifies the user-created cache that the system uses to cache DNS responses. When you select a cache for the system to use, you must also set `enable_dns_cache` to `yes`
enable_cache boolean added in 2.7 | Choices: no yes | Specifies whether the system caches DNS responses. When creating a new profile, if this parameter is not specified, the default is provided by the parent profile. When `yes`, the BIG-IP system caches DNS responses handled by the virtual servers associated with this profile. When you enable this setting, you must also specify a value for `cache_name`. When `no`, the BIG-IP system does not cache DNS responses handled by the virtual servers associated with this profile. However, the profile retains the association with the DNS cache in the `cache_name` parameter. Disable this setting when you want to debug the system.
enable_dns_express boolean | Choices: no yes | Specifies whether the DNS Express engine is enabled. When creating a new profile, if this parameter is not specified, the default is provided by the parent profile. The DNS Express engine receives zone transfers from the authoritative DNS server for the zone. If the `enable_zone_transfer` setting is also `yes` on this profile, the DNS Express engine also responds to zone transfer requests made by the nameservers configured as zone transfer clients for the DNS Express zone.
enable_dns_firewall boolean | Choices: no yes | Specifies whether DNS firewall capability is enabled. When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
enable_dnssec boolean | Choices: no yes | Specifies whether the system signs responses with DNSSEC keys and replies to DNSSEC specific queries (e.g., DNSKEY query type). When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
enable_gtm boolean | Choices: no yes | Specifies whether the system uses Global Traffic Manager to manage the response. When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
enable_zone_transfer boolean | Choices: no yes | Specifies whether the system answers zone transfer requests for a DNS zone created on the system. When creating a new profile, if this parameter is not specified, the default is provided by the parent profile. The `enable_dns_express` and `enable_zone_transfer` settings on a DNS profile affect how the system responds to zone transfer requests. When the `enable_dns_express` and `enable_zone_transfer` settings are both `yes`, if a zone transfer request matches a DNS Express zone, then DNS Express answers the request. When the `enable_dns_express` setting is `no` and the `enable_zone_transfer` setting is `yes`, the BIG-IP system processes zone transfer requests based on the last action and answers the request from local BIND or a pool member.
name string / required |  | Specifies the name of the DNS profile.
parent string |  | Specifies the profile from which this profile inherits settings. When creating a new profile, if this parameter is not specified, the default is the system-supplied `dns` profile.
partition string | Default: "Common" | Device partition to manage resources on.
process_recursion_desired boolean | Choices: no yes | Specifies whether to process client-side DNS packets with Recursion Desired set in the header. When creating a new profile, if this parameter is not specified, the default is provided by the parent profile. If set to `no`, processing of the packet is subject to the unhandled-query-action option.
provider dictionary added in 2.5 |  | 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.
| 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`.
| ssh_keyfile path |  | Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for cli transports. You may omit this option by setting the environment variable `ANSIBLE_NET_SSH_KEYFILE`.
| 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: cli 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 that the profile exists. When `absent`, ensures the profile is removed.
unhandled_query_action string added in 2.7 | Choices: allow drop reject hint no-error | Specifies the action to take when a query does not match a Wide IP or a DNS Express Zone. When `allow`, the BIG-IP system forwards queries to a DNS server or pool member. If a pool is not associated with a listener and the Use BIND Server on BIG-IP setting is set to Enabled, requests are forwarded to the local BIND server. When `drop`, the BIG-IP system does not respond to the query. When `reject`, the BIG-IP system returns the query with the REFUSED return code. When `hint`, the BIG-IP system returns the query with a list of root name servers. When `no-error`, the BIG-IP system returns the query with the NOERROR return code. When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
use_local_bind boolean | Choices: no yes | Specifies whether the system forwards non-wide IP queries to the local BIND server on the BIG-IP system. For best performance, disable this setting when using a DNS cache. When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.

## 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 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 profile
      bigip_profile_dns:
        name: foo
        enable_dns_express: no
        enable_dnssec: no
        enable_gtm: no
        process_recursion_desired: no
        use_local_bind: no
        enable_dns_firewall: yes
        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
--- | --- | ---
cache_name string | changed | Name of the cache used by DNS. Sample: /Common/cache1
enable_cache boolean | changed | Whether DNS caching is enabled or not.
enable_dns_express boolean | changed | Whether DNS Express is enabled on the resource or not. Sample: True
enable_dns_firewall boolean | changed | Whether DNS firewall capability is enabled or not.
enable_dnssec boolean | changed | Whether DNSSEC is enabled on the resource or not.
enable_gtm boolean | changed | Whether GTM is used to manage the resource or not. Sample: True
enable_zone_transfer boolean | changed | Whether zone transfer are enabled on the resource or not.
process_recursion_desired boolean | changed | Whether client-side DNS packets are processed with Recursion Desired set. Sample: True
unhandled_query_action string | changed | What to do with unhandled queries Sample: allow
use_local_bind boolean | changed | Whether non-wide IP queries are forwarded to the local BIND server or not.

## Status

- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by an Ansible Partner. [certified]

### Authors

- Tim Rupp (@caphrim007)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.