Initial commit
Some checks failed
/ ansible-docsmith (push) Failing after 21s

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2026-02-16 15:44:16 +01:00 committed by Julien Riou
commit e264652661
Signed by: jriou
GPG key ID: 9A099EDA51316854
73 changed files with 3378 additions and 0 deletions

45
roles/certbot/README.md Normal file
View file

@ -0,0 +1,45 @@
# Ansible Role Certbot
## Table of content
<!-- ANSIBLE DOCSMITH TOC START -->
* [Role variables](#variables)
* [`certbot_email`](#variable-certbot_email)
* [`certbot_domain`](#variable-certbot_domain)
<!-- ANSIBLE DOCSMITH TOC END -->
<!-- ANSIBLE DOCSMITH MAIN START -->
## Role variables<a id="variables"></a>
The following variables can be configured for this role:
| Variable | Type | Required | Default | Description (abstract) |
|----------|------|----------|---------|------------------------|
| `certbot_email` | `str` | Yes | N/A | E-mail to register the certificate |
| `certbot_domain` | `str` | Yes | N/A | Domain name to register the certificate |
### `certbot_email`<a id="variable-certbot_email"></a>
[*⇑ Back to ToC ⇑*](#toc)
E-mail to register the certificate
- **Type**: `str`
- **Required**: Yes
### `certbot_domain`<a id="variable-certbot_domain"></a>
[*⇑ Back to ToC ⇑*](#toc)
Domain name to register the certificate
- **Type**: `str`
- **Required**: Yes
<!-- ANSIBLE DOCSMITH MAIN END -->

View file

@ -0,0 +1,18 @@
---
argument_specs:
main:
short_description: Install and configure a certbot
description:
- Install and configure a [certbot](https://certbot.eff.org/).
author:
- jriou
options:
certbot_email:
description:
- E-mail to register the certificate
required: true
certbot_domain:
description:
- Domain name to register the certificate
required: true

View file

@ -0,0 +1,17 @@
---
- name: Check requirements
ansible.builtin.assert:
that:
- certbot_email is defined
- certbot_domain is defined
- name: Install packages
ansible.builtin.package:
name: certbot
- name: Request certificate
ansible.builtin.command:
cmd: >-
certbot certonly --standalone -n --agree-tos
--email {{ certbot_email }} -d {{ certbot_domain }}
creates: /etc/letsencrypt/live/{{ certbot_domain }}/fullchain.pem