community.crypto.ecs_domain module – Request validation of a domain with the Entrust Certificate Services (ECS) API
Note
This module is part of the community.crypto collection (version 2.22.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.crypto
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.crypto.ecs_domain
.
New in community.crypto 1.0.0
Synopsis
Request validation or re-validation of a domain with the Entrust Certificate Services (ECS) API.
Requires credentials for the Entrust Certificate Services (ECS) API.
If the domain is already in the validation process, no new validation will be requested, but the validation data (if applicable) will be returned.
If the domain is already in the validation process but the
verification_method
specified is different than the currentverification_method
, theverification_method
will be updated and validation data (if applicable) will be returned.If the domain is an active, validated domain, the return value of
changed
will be false, unlessdomain_status=EXPIRED
, in which case a re-validation will be performed.If
verification_method=dns
, details about the required DNS entry will be specified in the return parametersdns_contents
,dns_location
, anddns_resource_type
.If
verification_method=web_server
, details about the required file details will be specified in the return parametersfile_contents
andfile_location
.If
verification_method=email
, the email address(es) that the validation email(s) were sent to will be in the return parameteremails
. This is purely informational. For domains requested using this module, this will always be a list of size 1.
Requirements
The below requirements are needed on the host that executes this module.
PyYAML >= 3.11
Parameters
Parameter |
Comments |
---|---|
The client ID to request the domain be associated with. If no client ID is specified, the domain will be added under the primary client with ID of 1. Default: |
|
The domain name to be verified or reverified. |
|
The path to the key for the client certificate used to authenticate to the Entrust Certificate Services (ECS) API. |
|
The path to the client certificate used to authenticate to the Entrust Certificate Services (ECS) API. |
|
The key (password) for authentication to the Entrust Certificate Services (ECS) API. |
|
The path to the specification file defining the Entrust Certificate Services (ECS) API configuration. You can use this to keep a local copy of the specification to avoid downloading it every time the module is used. Default: |
|
The username for authentication to the Entrust Certificate Services (ECS) API. |
|
Email address to be used to verify domain ownership. Email address must be either an email address present in the WHOIS data for Note that if If using the email values from the WHOIS data for the domain or its top level namespace, they must be exact matches. If To verify domain ownership, domain owner must follow the instructions in the email they receive. Only allowed if |
|
The verification method to be used to prove control of the domain. If If If If Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Notes
Note
There is a small delay (typically about 5 seconds, but can be as long as 60 seconds) before obtaining the random values when requesting a validation while
verification_method=dns
orverification_method=web_server
. Be aware of that if doing many domain validation requests.
See Also
See also
- community.crypto.x509_certificate
Can be used to request certificates from ECS, with
provider=entrust
.- community.crypto.ecs_certificate
Can be used to request a Certificate from ECS using a verified domain.
Examples
- name: Request domain validation using email validation for client ID of 2.
community.crypto.ecs_domain:
domain_name: ansible.com
client_id: 2
verification_method: email
verification_email: admin@ansible.com
entrust_api_user: apiusername
entrust_api_key: a^lv*32!cd9LnT
entrust_api_client_cert_path: /etc/ssl/entrust/ecs-client.crt
entrust_api_client_cert_key_path: /etc/ssl/entrust/ecs-client.key
- name: Request domain validation using DNS. If domain is already valid,
request revalidation if expires within 90 days
community.crypto.ecs_domain:
domain_name: ansible.com
verification_method: dns
entrust_api_user: apiusername
entrust_api_key: a^lv*32!cd9LnT
entrust_api_client_cert_path: /etc/ssl/entrust/ecs-client.crt
entrust_api_client_cert_key_path: /etc/ssl/entrust/ecs-client.key
- name: Request domain validation using web server validation, and revalidate
if fewer than 60 days remaining of EV eligibility.
community.crypto.ecs_domain:
domain_name: ansible.com
verification_method: web_server
entrust_api_user: apiusername
entrust_api_key: a^lv*32!cd9LnT
entrust_api_client_cert_path: /etc/ssl/entrust/ecs-client.crt
entrust_api_client_cert_key_path: /etc/ssl/entrust/ecs-client.key
- name: Request domain validation using manual validation.
community.crypto.ecs_domain:
domain_name: ansible.com
verification_method: manual
entrust_api_user: apiusername
entrust_api_key: a^lv*32!cd9LnT
entrust_api_client_cert_path: /etc/ssl/entrust/ecs-client.crt
entrust_api_client_cert_key_path: /etc/ssl/entrust/ecs-client.key
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The value that ECS will be expecting to find in the DNS record located at Returned: changed and if Sample: |
|
The location that ECS will be expecting to be able to find the DNS entry for domain verification, containing the contents of Returned: changed and if Sample: |
|
The type of resource record that ECS will be expecting for the DNS record located at Returned: changed and if Sample: |
|
Status of the current domain. Will be one of Returned: changed or success Sample: |
|
The list of emails used to request validation of this domain. Domains requested using this module will only have a list of size 1. Returned: Sample: |
|
The number of days the domain remains eligible for submission of “EV” certificates. Will never be greater than the value of Returned: success and Sample: |
|
Whether the domain is eligible for submission of “EV” certificates. Will never be Returned: success and Sample: |
|
The contents of the file that ECS will be expecting to find at Returned: Sample: |
|
The location that ECS will be expecting to be able to find the file for domain verification, containing the contents of Returned: Sample: |
|
The number of days the domain remains eligible for submission of “OV” certificates. Will never be less than the value of Returned: success and Sample: |
|
Whether the domain is eligible for submission of “OV” certificates. Will never be Returned: success and Sample: |
|
Verification method used to request the domain validation. If Returned: changed or success Sample: |