feat(server/certbot): add support for certbot

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-07-10 16:43:18 +02:00
parent 282d61d808
commit 90bac3a306
Signed by: mfocko
SSH key fingerprint: SHA256:5YXD7WbPuK60gxnG6DjAwJiS9+swoWj33/HFu8g8JVo
4 changed files with 23 additions and 0 deletions

View file

@ -4,3 +4,6 @@ servers:
poincare:
maxwell:
system_sshd_port: 6969
vars:
cloudflare_token: None

View file

@ -0,0 +1,7 @@
---
- name: Install the Certbot and Cloudflare plugin
ansible.builtin.package:
name:
- certbot
- python3-certbot-dns-cloudflare
state: present

View file

@ -0,0 +1,12 @@
---
- name: Packages
ansible.builtin.include_tasks: install.yml
tags: install
- name: Install the Cloudflare secrets
ansible.builtin.template:
src: templates/cloudflare.ini
dest: /root/.secrets/cloudflare.ini
mode: 0600
owner: root
group: root

View file

@ -0,0 +1 @@
dns_cloudflare_api_token = {{ cloudflare_token }}