You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB
Markdown

2 years ago
# 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:
- `nginx`: https://gitea.auro.re/Pains-Perdus/nginx.git
## 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
Copyright 2021 Jean-Marie Mineau <histausse@protonmail.com>