New in version 2.2.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
api_key | API key of the Exoscale DNS API. Since 2.4, the ENV variable CLOUDSTACK_KEY is used as default, when defined. | |
api_region | Default: cloudstack | Name of the ini section in the cloustack.ini file.Since 2.4, the ENV variable CLOUDSTACK_REGION is used as default, when defined. |
api_secret | Secret key of the Exoscale DNS API. Since 2.4, the ENV variable CLOUDSTACK_SECRET is used as default, when defined. | |
api_timeout | Default: 10 | HTTP timeout to Exoscale DNS API. Since 2.4, the ENV variable CLOUDSTACK_TIMEOUT is used as default, when defined. |
content | Content of the record. Required if state=present or multiple=yes .aliases: value, address | |
domain required | Domain the record is related to. | |
multiple bool |
| Whether there are more than one records with similar name and record_type .Only allowed for a few record types, e.g. record_type=A , record_type=NS or record_type=MX .content will not be updated, instead it is used as a key to find existing records. |
name | Default: | Name of the record. |
prio | Priority of the record. aliases: priority | |
record_type |
| Type of the record. aliases: rtype, type |
state |
| State of the record. |
ttl | Default: 3600 | TTL of the record in seconds. |
validate_certs bool |
| Validate SSL certs of the Exoscale DNS API. |
Note
CLOUDSTACK_KEY
, CLOUDSTACK_SECRET
environment variables. A CLOUDSTACK_CONFIG
environment variable pointing to an .ini
file, A cloudstack.ini
file in the current working directory. A .cloudstack.ini
file in the users home directory. Optionally multiple credentials and endpoints can be specified using ini sections in cloudstack.ini
. Use the argument api_region
to select the section name, default section is cloudstack
.- name: Create or update an A record local_action: module: exo_dns_record name: web-vm-1 domain: example.com content: 1.2.3.4 - name: Update an existing A record with a new IP local_action: module: exo_dns_record name: web-vm-1 domain: example.com content: 1.2.3.5 - name: Create another A record with same name local_action: module: exo_dns_record name: web-vm-1 domain: example.com content: 1.2.3.6 multiple: yes - name: Create or update a CNAME record local_action: module: exo_dns_record name: www domain: example.com record_type: CNAME content: web-vm-1 - name: Create another MX record local_action: module: exo_dns_record domain: example.com record_type: MX content: mx1.example.com prio: 10 multiple: yes - name: Delete one MX record out of multiple local_action: module: exo_dns_record domain: example.com record_type: MX content: mx1.example.com multiple: yes state: absent - name: Remove a single A record local_action: module: exo_dns_record name: www domain: example.com state: absent
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |
---|---|---|---|
exo_dns_record complex | success | API record results | |
domain string | success | Name of the domain Sample: example.com | |
name string | success | name of the record Sample: www | |
prio int | success | Priority of the record Sample: 10 | |
parent_id int | success | ID of the parent | |
system_record bool | success | Whether the record is a system record or not | |
created_at string | success | When the record was created Sample: 2016-08-12T15:24:23.989Z | |
updated_at string | success | When the record was updated Sample: 2016-08-12T15:24:23.989Z | |
id int | success | ID of the record Sample: 254324 | |
content string | success | value of the record Sample: 1.2.3.4 | |
record_type string | success | Priority of the record Sample: A | |
ttl int | success | Time to live of the record Sample: 3600 | |
domain_id int | success | ID of the domain Sample: 254324 |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/exo_dns_record_module.html