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.14.0).
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 current verification_method, the verification_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, unless
domain_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 parameters dns_contents, dns_location, and dns_resource_type.If
verification_method=web_server
, details about the required file details will be specified in the return parameters file_contents and file_location.If
verification_method=email
, the email address(es) that the validation email(s) were sent to will be in the return parameter emails. 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 domain_name, or one of the following constructed emails: admin@domain_name, administrator@domain_name, webmaster@domain_name, hostmaster@domain_name, postmaster@domain_name. Note that if domain_name includes subdomains, the top level domain should be used. For example, if requesting validation of example1.ansible.com, or test.example2.ansible.com, and you want to use the “admin” preconstructed name, the email address should be admin@ansible.com. 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: [email protected]
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 |
---|---|
Client ID that the domain belongs to. If the input value client_id is specified, this will always be the same as client_id Returned: changed or success Sample: |
|
The value that ECS will be expecting to find in the DNS record located at dns_location. Returned: changed and if verification_method is Sample: |
|
The location that ECS will be expecting to be able to find the DNS entry for domain verification, containing the contents of dns_contents. Returned: changed and if verification_method is Sample: |
|
The type of resource record that ECS will be expecting for the DNS record located at dns_location. Returned: changed and if verification_method is 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: verification_method is Sample: |
|
The number of days the domain remains eligible for submission of “EV” certificates. Will never be greater than the value of ov_days_remaining Returned: success and ev_eligible is Sample: |
|
Whether the domain is eligible for submission of “EV” certificates. Will never be Returned: success and domain_status is Sample: |
|
The contents of the file that ECS will be expecting to find at Returned: verification_method is Sample: |
|
The location that ECS will be expecting to be able to find the file for domain verification, containing the contents of file_contents. Returned: verification_method is Sample: |
|
The number of days the domain remains eligible for submission of “OV” certificates. Will never be less than the value of ev_days_remaining Returned: success and ov_eligible is Sample: |
|
Whether the domain is eligible for submission of “OV” certificates. Will never be Returned: success and domain_status is Sample: |
|
Verification method used to request the domain validation. If Returned: changed or success Sample: |
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication