Note
This module is part of the community.crypto collection (version 2.26.5).
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.acme_ari_info.
New in community.crypto 2.20.0
The below requirements are needed on the host that executes this module.
Parameter | Comments |
|---|---|
acme_directory string / required | The ACME directory to use. This is the entry point URL to access the ACME CA server API. For safety reasons the default is set to the Let’s Encrypt staging server (for the ACME v1 protocol). This will create technically correct, but untrusted certificates. For Let’s Encrypt, all staging endpoints can be found here: https://letsencrypt.org/docs/staging-environment/. For Buypass, all endpoints can be found here: https://community.buypass.com/t/63d4ay/buypass-go-ssl-endpoints. For Let’s Encrypt, the production directory URL for ACME v2 is https://acme-v02.api.letsencrypt.org/directory. For Buypass, the production directory URL for ACME v2 and v1 is https://api.buypass.com/acme/directory. For ZeroSSL, the production directory URL for ACME v2 is https://acme.zerossl.com/v2/DV90. For Sectigo, the production directory URL for ACME v2 is https://acme-qa.secure.trust-provider.com/v2/DV. For HARICA, the production directory URL for ACME v2 is https://acme.harica.gr/XXX/directory with XXX being specific to your account. The notes for this module contain a list of ACME services this module has been tested against. |
acme_version integer / required | The ACME version of the endpoint. Must be The value Choices:
|
certificate_content string | The content of the X.509 certificate to request information for. Exactly one of |
certificate_path path | A path to the X.509 certificate to request information for. Exactly one of |
request_timeout integer added in community.crypto 2.3.0 | The time Ansible should wait for a response from the ACME API. This timeout is applied to all HTTP(S) requests (HEAD, GET, POST). Default: |
select_crypto_backend string | Determines which crypto backend to use. The default choice is If set to If set to Choices:
|
validate_certs boolean | Whether calls to the ACME directory will validate TLS certificates. Warning: Should only ever be set to Choices:
|
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full This action does not modify state. | Can run in |
diff_mode | Support: N/A This action does not modify state. | Will return details on what has changed (or possibly needs changing in |
idempotent | Support: full This action does not modify state. | When run twice in a row outside check mode, with the same arguments, the second invocation indicates no change. This assumes that the system controlled/queried by the module has not changed in a relevant way. |
Note
cryptography library is available (see Requirements for details), it will be used instead of the openssl binary. This can be explicitly disabled or enabled with the select_crypto_backend option. Note that using the openssl binary will be slower.See also
Allows to obtain a certificate using the ACME protocol.
Allows to revoke a certificate using the ACME protocol.
---
- name: Retrieve renewal information for a certificate
community.crypto.acme_ari_info:
certificate_path: /etc/httpd/ssl/sample.com.crt
register: cert_data
- name: Show the certificate renewal information
ansible.builtin.debug:
var: cert_data.renewal_info
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
renewal_info dictionary | The ARI renewal info object (https://www.rfc-editor.org/rfc/rfc9773.html#section-4.2). Returned: success |
|
explanationURL string |
A URL pointing to a page which may explain why the suggested renewal window is what it is. For example, it may be a page explaining the CA’s dynamic load-balancing strategy, or a page documenting which certificates are affected by a mass revocation event. Should be shown to the user. Returned: depends on the ACME server Sample: |
|
retryAfter string |
A timestamp before the next retry to ask for this information should not be made. Returned: depends on the ACME server Sample: |
|
suggestedWindow dictionary |
Describes the window during which the certificate should be renewed. Returned: always |
|
end string |
The end of the window during which the certificate should be renewed. The format is specified in RFC 3339. Returned: always Sample: |
|
start string |
The start of the window during which the certificate should be renewed. The format is specified in RFC 3339. Returned: always Sample: |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/crypto/acme_ari_info_module.html