On this page
exo_dns_domain - Manages domain records on Exoscale DNS API.
New in version 2.2.
Synopsis
- Create and remove domain records.
 
Requirements
The below requirements are needed on the host that executes this module.
- python >= 2.6
 
Parameters
| 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.
        | 
     
| name  
        required
         | 
      
        
        Name of the record.
         | 
     |
| state | 
       
  | 
      
        
        State of the resource.
         | 
     
| validate_certs  
        bool
         | 
      
       
  | 
      
        
        Validate SSL certs of the Exoscale DNS API.
         | 
     
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_SECRETenvironment variables. ACLOUDSTACK_CONFIGenvironment variable pointing to an.inifile, Acloudstack.inifile in the current working directory. A.cloudstack.inifile in the users home directory. Optionally multiple credentials and endpoints can be specified using ini sections incloudstack.ini. Use the argumentapi_regionto 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 a domain
  local_action:
    module: exo_dns_domain
    name: example.com
- name: Remove a domain
  local_action:
    module: exo_dns_domain
    name: example.com
    state: absent
  Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | |
|---|---|---|---|
| exo_dns_domain  
        complex
         | 
      success | 
        
        API domain results
          | 
     |
| account_id  
        int
         | 
      success | 
        
        Your account ID
         Sample:
        
       
        34569
         | 
     |
| auto_renew  
        bool
         | 
      success | 
        
        Whether domain is auto renewed or not
          | 
     |
| created_at  
        string
         | 
      success | 
        
        When the domain was created
         Sample:
        
       
        2016-08-12T15:24:23.989Z
         | 
     |
| expires_on  
        string
         | 
      success | 
        
        When the domain expires
         Sample:
        
       
        2016-08-12T15:24:23.989Z
         | 
     |
| id  
        int
         | 
      success | 
        
        ID of the domain
         Sample:
        
       
        2016-08-12T15:24:23.989Z
         | 
     |
| lockable  
        bool
         | 
      success | 
        
        Whether the domain is lockable or not
         Sample:
        
       
        True
         | 
     |
| name  
        string
         | 
      success | 
        
        Domain name
         Sample:
        
       
        example.com
         | 
     |
| record_count  
        int
         | 
      success | 
        
        Number of records related to this domain
         Sample:
        
       
        5
         | 
     |
| registrant_id  
        int
         | 
      success | 
        
        ID of the registrant
          | 
     |
| service_count  
        int
         | 
      success | 
        
        Number of services
          | 
     |
| state  
        string
         | 
      success | 
        
        State of the domain
         Sample:
        
       
        hosted
         | 
     |
| token  
        string
         | 
      success | 
        
        Token
         Sample:
        
       
        r4NzTRp6opIeFKfaFYvOd6MlhGyD07jl
         | 
     |
| unicode_name  
        string
         | 
      success | 
        
        Domain name as unicode
         Sample:
        
       
        example.com
         | 
     |
| updated_at  
        string
         | 
      success | 
        
        When the domain was updated last.
         Sample:
        
       
        2016-08-12T15:24:23.989Z
         | 
     |
| user_id  
        int
         | 
      success | 
        
        ID of the user
          | 
     |
| whois_protected  
        bool
         | 
      success | 
        
        Whether the whois is protected or not
          | 
     |
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance
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.
Author
- René Moser (@resmo)
 
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
 https://docs.ansible.com/ansible/2.6/modules/exo_dns_domain_module.html