This role requests a certificate from Let's Encrypt, setting up the auto renewal configuration file.
In your local machine:
pip install -r requirements.txtdomain: Domain name of the requested certificate.web_path_letsencrypt: path where to store the ACME challenges.letsencrypt_renewal_conf: For configuring the autorenewal settings, used only ifletsencrypt_renew_hookis defined.letsencrypt_renew_hook: Command to execute when a successful renewal of thedomainhappens. For example:/usr/sbin/service nginx restartletsencrypt_method: Method to use when requesting the certificate the first time.standaloneorwebroot(default).
sudoandpythonin the target host(s).- certbot It also needs to have a web directory and a web server/proxy configured for the ACME challenge. You can use this configuration for example nginx.
- name: Request Let's Encrypt
hosts: all
vars:
domain: sub.domain.tld
letsencrypt_renew_hook: /usr/sbin/service nginx restart
roles:
- role: letsencrypt_requestTo test the role you need molecule,
docker and some python requirements that can be installed wwith
pip install -r requirements-dev.txt.
molecule testor
make testGPLv3
- m0wer (at) autistici (dot) org