community.crypto.ecs_domain – Request validation of a domain with the Entrust Certificate Services (ECS) API¶
Note
This plugin is part of the community.crypto collection (version 1.6.1).
To install it use: ansible-galaxy collection install community.crypto
.
To use it in a playbook, specify: community.crypto.ecs_domain
.
New in version 1.0.0: of community.crypto
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 | Choices/Defaults | Comments |
---|---|---|
client_id
integer
|
Default: 1
|
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.
|
domain_name
string
/ required
|
The domain name to be verified or reverified.
|
|
entrust_api_client_cert_key_path
path
/ required
|
The path to the key for the client certificate used to authenticate to the Entrust Certificate Services (ECS) API.
|
|
entrust_api_client_cert_path
path
/ required
|
The path to the client certificate used to authenticate to the Entrust Certificate Services (ECS) API.
|
|
entrust_api_key
string
/ required
|
The key (password) for authentication to the Entrust Certificate Services (ECS) API.
|
|
entrust_api_specification_path
path
|
Default: "https://cloud.entrust.net/EntrustCloud/documentation/cms-api-2.1.0.yaml"
|
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.
|
entrust_api_user
string
/ required
|
The username for authentication to the Entrust Certificate Services (ECS) API.
|
|
verification_email
string
|
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 [email protected].
If using the email values from the WHOIS data for the domain or it's top level namespace, they must be exact matches.
If
verification_method=email but verification_email is not provided, the first email address found in WHOIS data for the domain will be used.To verify domain ownership, domain owner must follow the instructions in the email they receive.
Only allowed if
verification_method=email |
|
verification_method
string
/ required
|
|
The verification method to be used to prove control of the domain.
If
verification_method=email and the value verification_email is specified, that value is used for the email validation. If verification_email is not provided, the first value present in WHOIS data will be used. An email will be sent to the address in verification_email with instructions on how to verify control of the domain.If
verification_method=dns , the value dns_contents must be stored in location dns_location, with a DNS record type of verification_dns_record_type. To prove domain ownership, update your DNS records so the text string returned by dns_contents is available at dns_location.If
verification_method=web_server , the contents of return value file_contents must be made available on a web server accessible at location file_location.If
verification_method=manual , the domain will be validated with a manual process. This is not recommended. |
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:
Authors¶
Chris Trufan (@ctrufan)