DEPRECATED see https://docs.ansible.com/ansible/latest/modules/letsencrypt_module.html
Installs letsencrypt and generates/installs a certificate.
In order to generate a certificate port 443 needs to be open and the following variables are required.
Required Variables:
subdomain:
domain:
letsencrypt_email:
Optional Variables:
server_type:
#apache or nginx. Will use the webserver of your choosing to verify the request (Standalone).revoke:
#Set toyes
if you want to revoke the certificateforce_renewal:
#Set toyes
to force certificate renewal.
Example:
- hosts: letsencrypt
remote_user: <your_user>
become: yes
vars:
subdomain: www
domain: example.com
letsencrypt_email: [email protected]
roles:
- CorbanR.letsencrypt
authenticator: "standalone"
certificate_path: /etc/letsencrypt/live
letsencrypt_bin: "/root/.local/share/letsencrypt/bin/letsencrypt"
letsencrypt_gitlocation: /opt/letsencrypt
letsencrypt_server: https://acme-staging.api.letsencrypt.org/directory
renew_days: 10
rsa_key_size: 2048
ssl_days_remaining: "{{ renew_days }}"
standalone_supported_challenges: "tls-sni-01"
webroot_path: ""
- Multiple certificate logic
- Add logic for authenticator type != "standalone"
- Add cron job to check certificate expiration and auto renew.