This play is for renewing a Let's Encrypt certificate installed using the bncert-tool or Lego tool.
Reference: https://aws.amazon.com/premiumsupport/knowledge-center/lightsail-bitnami-renew-ssl-certificate/
Tailored to my requirments for renewing the SSL certificate on my AWS Lightsail instance hosting wordpress.
community.general
community.crypto
Group variables defined in group_vars/all/cert_vars.yml
cert_email: <email> # The email used to register the certificate with LetsEncrypt
cert_domain: <domain> # The certificate domain registered with LetsEncrypt
cert_path: /opt/bitnami/letsencrypt/certificates/<domain>.crt
Default role variables for the check_cert role are listed below (see defaults/main.yml
)
max_validity: 7 # maximum number of days of current certificate validity before renewal will be carried out
skip_check: no # carry out renewal regardless of current validity
None
- hosts: all
become: true
roles:
- check_cert
- renew_cert
This playbook was created in 2022 by Lee Woodhouse