computer-playbook/roles/srv-web-7-7-letsencrypt
Kevin Veen-Birkenbach 2620ee088e
refactor(dns): unify Cloudflare + Hetzner handling across roles
- replaced CERTBOT_DNS_API_TOKEN with CLOUDFLARE_API_TOKEN everywhere
- introduced generic sys-dns-cloudflare-records role for managing DNS records
- added sys-dns-hetzner-rdns role with both Cloud (hcloud) and Robot API flavors
- updated Mailu role to:
  - generate DKIM before DNS setup
  - delegate DNS + rDNS records to the new generic roles
- removed legacy per-role Cloudflare vars (MAILU_CLOUDFLARE_API_TOKEN)
- extended group vars with HOSTING_PROVIDER for rDNS flavor decision
- added hetzner.hcloud collection to requirements

This consolidates DNS management into reusable roles,
supports both Cloudflare and Hetzner providers,
and standardizes variable naming across the project.
2025-08-16 21:43:01 +02:00
..
2025-07-11 15:25:58 +02:00
2025-07-11 15:25:58 +02:00
2025-07-11 15:25:58 +02:00

Lets Encrypt SSL for Nginx 🔐

Description

Automates obtaining, configuring, and renewing Lets Encrypt SSL certificates for Nginx with Certbot. Keeps your sites secure with minimal fuss! 🌐

Overview

This Ansible role sets up the necessary Nginx configuration and Certbot integration to:

  • Redirect HTTP traffic to HTTPS
  • Serve the ACME challenge for certificate issuance
  • Apply strong SSL/TLS defaults
  • Schedule automatic renewals

Its idempotent: configuration and certificate tasks only run when needed.

Purpose

Ensure all your Nginx-hosted sites use free, trusted SSL certificates from Lets Encrypt—all managed automatically via Ansible. 🎯

Features

  • Automatic Certificate Issuance: Uses Certbots webroot plugin to request and install certificates. 📜
  • Nginx Redirect: Creates a temporary HTTP → HTTPS redirect block. ↪️
  • ACMEChallenge Handling: Configures /.well-known/acme-challenge/ for Certbot validation. 🔍
  • Secure SSL Defaults: Includes modern cipher suites, HSTS, OCSP stapling, and session settings. 🔒
  • AutoRenewal: Leverages system scheduling (cron or systemd timer) to renew certs before expiration. 🔄
  • OneTime Setup: Tasks guarded by a “run once” fact to avoid re-applying unchanged templates. 🏃‍♂️