exo_dns_record – Manages DNS records on Exoscale DNS¶
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
Parameters¶
Notes¶
Note
As Exoscale DNS uses the same API key and secret for all services, we reuse the config used for Exscale Compute based on CloudStack. The config is read from several locations, in the following order. The
CLOUDSTACK_KEY
,CLOUDSTACK_SECRET
environment variables. ACLOUDSTACK_CONFIG
environment variable pointing to an.ini
file, Acloudstack.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 incloudstack.ini
. Use the argumentapi_region
to select the section name, default section iscloudstack
.This module does not support multiple A records and will complain properly if you try.
More information Exoscale DNS can be found on https://community.exoscale.ch/documentation/dns/.
This module supports check mode and diff.
Examples¶
- name: Create or update an A record
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
exo_dns_record:
name: web-vm-1
domain: example.com
content: 1.2.3.5
- name: Create another A record with same name
exo_dns_record:
name: web-vm-1
domain: example.com
content: 1.2.3.6
multiple: yes
- name: Create or update a CNAME record
exo_dns_record:
name: www
domain: example.com
record_type: CNAME
content: web-vm-1
- name: Create another MX record
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
exo_dns_record:
domain: example.com
record_type: MX
content: mx1.example.com
multiple: yes
state: absent
- name: Remove a single A record
exo_dns_record:
name: www
domain: example.com
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
René Moser (@resmo)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.