No description
Find a file
2022-08-08 21:55:58 +02:00
meta cerbot role 2022-08-07 18:39:24 +02:00
tasks certbot, not cerbot 2022-08-08 21:55:58 +02:00
README.md cerbot role 2022-08-07 18:39:24 +02:00

Certbot ansible role

Install certbot for debian and request certificats.

This role is part of my ansible roles. It is made to interact with other roles that are listed here, and require some variables.

In particular, the nginx role allows to proxy the request from a machine cut from the internet to the LE server.

Role required:

Variable required:

ip_LE_proxy: str, optionnal, the IP of the proxy to LE
certbot_certs:
  `domaine_name`:
    links: str[], list of links pointing to the certificate/key (the keychain link will be suffixed by `.crt`, the key by `.key`)
    hooks: str[], optional, list of commands to run after renewing the certificat

certbot_certs is a dictionnary, where the keys are the domaine names for the certificates.

Optionnal variables

http_sites: dictionnary of sites, used by the nginx role

Add role to you ansible playbook:

To add this role to your project, you can use git submodules:

git submodule add ssh://git@gitea.auro.re:2222/Pains-Perdus/certbot.git roles/certbot
git submodule init

Http Sites

The variable http_sites is a dictionnary of the http site managed by nginx. The additionnal (and optionnal) field use_certbot can be added to the variable of a site so that certbot generat its certificate.

http_sites:
  `server_name`:
    ...
    use_certbot: bool, optionnal (default false), if set to true, add an entry to `certbot_certs` automagically.

Copyright 2021 Jean-Marie Mineau histausse@protonmail.com