New in version 2.2.
parameter | required | default | choices | comments |
---|---|---|---|---|
account_email | no | The email address associated with this account. It will be used for certificate expiration warnings. | ||
account_key | yes | File containing the Let's Encrypt account RSA key. Can be created with openssl rsa ... . | ||
acme_directory | no | https://acme-staging.api.letsencrypt.org/directory | The ACME directory to use. This is the entry point URL to access CA server API. For safety reasons the default is set to the Let's Encrypt staging server. This will create technically correct, but untrusted certificates. | |
agreement | no | https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf | URI to a terms of service document you agree to when using the ACME service at acme_directory . | |
challenge | no | http-01 |
| The challenge to be performed. |
csr | yes | File containing the CSR for the new certificate. Can be created with openssl csr ... .The CSR may contain multiple Subject Alternate Names, but each one will lead to an individual challenge that must be fulfilled for the CSR to be signed. aliases: src | ||
data | no | The data to validate ongoing challenges. The value that must be used here will be provided by a previous use of this module. | ||
dest | yes | The destination file for the certificate. aliases: cert | ||
remaining_days | no | 10 | The number of days the certificate must have left being valid. If cert_days < remaining_days , then it will be renewed. If the certificate is not renewed, module return values will not include challenge_data . |
- letsencrypt: account_key: /etc/pki/cert/private/account.key csr: /etc/pki/cert/csr/sample.com.csr dest: /etc/httpd/ssl/sample.com.crt register: sample_com_challenge # perform the necessary steps to fulfill the challenge # for example: # # - copy: # dest: /var/www/html/{{ sample_com_challenge['challenge_data']['sample.com']['http-01']['resource'] }} # content: "{{ sample_com_challenge['challenge_data']['sample.com']['http-01']['resource_value'] }}" # when: sample_com_challenge|changed - letsencrypt: account_key: /etc/pki/cert/private/account.key csr: /etc/pki/cert/csr/sample.com.csr dest: /etc/httpd/ssl/sample.com.crt data: "{{ sample_com_challenge }}"
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
challenge_data | per domain / challenge type challenge data | changed | complex | ||||||||||||||||
contains: |
| ||||||||||||||||||
cert_days | the number of days the certificate remains valid. | success | int | ||||||||||||||||
authorizations | ACME authorization data. | changed | complex | ||||||||||||||||
contains: |
|
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/letsencrypt_module.html