- knsupdate now only executes when is_abyayala_subdomain is true
- For external domains, display DNS configuration instructions in console
- Created dns_info.j2 template to show required DNS records for manual configuration
- External domains now show: A records, wildcard A records, and ACME challenge NS delegation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace dns-standalone with HTTP-01 webroot validation for root domains
(when root: yes flag is set). This change improves reliability by avoiding
DNS conflicts and simplifies the certificate obtention process.
Changes:
- Add acme_challenge.conf to serve .well-known/acme-challenge directory
- Update certbot.yml to use --webroot for root domains instead of dns-standalone
- Use official certbot/certbot:latest image for webroot (lighter, no DNS needed)
- Add certbot_webroot volume shared between nginx and certbot containers
- Configure vhost.conf to include ACME challenge location for root domains
- Add certbot_webroot variable (/var/www/certbot) to proxy vars
Benefits for root domains:
- No port 53 conflicts with Knot DNS
- Faster validation (HTTP vs DNS propagation)
- More reliable and simpler error handling
- Works with nginx already running on port 80
Wildcard domains continue using DNS-01 challenge as HTTP-01 does not
support wildcard certificates.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Rename the flag from `no_wildcard` to `root` throughout the codebase
for better semantics, and fix nginx configuration generation for root
domains.
Changes:
1. Renamed `no_wildcard` → `root` flag in:
- abyayala.yml (abyaya_root service)
- roles/certbot/tasks/certbot.yml (uses is_root_domain internally)
- README-root-domain.md (documentation)
2. Fixed nginx vhost generation in roles/proxy/templates/:
- vhost.conf: Handle root domains without leading dot in server_name
* root: yes → `server_name abyaya.la www.abyaya.la;` (exact match)
* root: no → `server_name .comun.abyaya.la;` (wildcard match)
- stream.conf: Same logic for SSH proxy streams
Problem fixed:
- Previous: `.abyaya.la` matched all subdomains, conflicting with
other vhosts (comun.abyaya.la, sutty.abyaya.la, etc.)
- Now: `abyaya.la www.abyaya.la` matches only root domain exactly
🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add capability to route root domain (abyaya.la and www.abyaya.la)
to sutty.comun while maintaining all existing subdomain routes.
Changes:
- Add no_wildcard flag support in certbot certificate generation
- Split certificate obtention into two conditional paths:
* Standard mode (with wildcard) for subdomains
* No-wildcard mode for root domains
- Add abyaya_root service in matrix routing to sutty.comun
- Include implementation plan as README-root-domain.md
Technical details:
- Certificates for root domain will only include abyaya.la and
www.abyaya.la (no *.abyaya.la wildcard)
- Prevents certificate confusion between root and subdomains
- Maintains clean separation of responsibilities
- All existing subdomain certificates remain unchanged
Generated with Claude Code
En Ansible 2.15+ las variables en el mismo set_fact se evalúan
simultáneamente, no secuencialmente. Separar needs_cert en su propio
set_fact antes de usarlo en needs_vhost y obtain_cert.
Ansible requiere que las condicionales resulten en booleanos.
Agregado filtro | bool para convertir explícitamente strings a booleanos
en las evaluaciones de needs_cert, needs_vhost y obtain_cert.
La limpieza de repositorios Docker antiguos debe ejecutarse SIEMPRE,
incluso cuando se usa --skip-tags=installation, para evitar conflictos
APT antes de que knsupdate u otros roles intenten usar apt.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Soluciona conflicto APT causado por configuraciones de repositorio Docker
duplicadas con valores Signed-By contradictorios. Ahora se eliminan los
archivos de repositorio antiguos antes de agregar la configuración deb822.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace dns-standalone with HTTP-01 webroot validation for root domains
(when root: yes flag is set). This change improves reliability by avoiding
DNS conflicts and simplifies the certificate obtention process.
Changes:
- Add acme_challenge.conf to serve .well-known/acme-challenge directory
- Update certbot.yml to use --webroot for root domains instead of dns-standalone
- Use official certbot/certbot:latest image for webroot (lighter, no DNS needed)
- Add certbot_webroot volume shared between nginx and certbot containers
- Configure vhost.conf to include ACME challenge location for root domains
- Add certbot_webroot variable (/var/www/certbot) to proxy vars
Benefits for root domains:
- No port 53 conflicts with Knot DNS
- Faster validation (HTTP vs DNS propagation)
- More reliable and simpler error handling
- Works with nginx already running on port 80
Wildcard domains continue using DNS-01 challenge as HTTP-01 does not
support wildcard certificates.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updates knsupdate logic to correctly generate DNS records for:
- abyaya.la (zone apex @)
- www.abyaya.la (www subdomain)
- Existing subdomains (sutty, marmite, etc.)
This fixes the Let's Encrypt DNS-01 challenge failure for www.abyaya.la
by ensuring _acme-challenge records are created correctly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Merge
Updates knsupdate logic to correctly generate DNS records for:
- abyaya.la (zone apex @)
- www.abyaya.la (www subdomain)
- Existing subdomains (sutty, marmite, etc.)
This fixes the Let's Encrypt DNS-01 challenge failure for www.abyaya.la
by ensuring _acme-challenge records are created correctly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Rename the flag from `no_wildcard` to `root` throughout the codebase
for better semantics, and fix nginx configuration generation for root
domains.
Changes:
1. Renamed `no_wildcard` → `root` flag in:
- abyayala.yml (abyaya_root service)
- roles/certbot/tasks/certbot.yml (uses is_root_domain internally)
- README-root-domain.md (documentation)
2. Fixed nginx vhost generation in roles/proxy/templates/:
- vhost.conf: Handle root domains without leading dot in server_name
* root: yes → `server_name abyaya.la www.abyaya.la;` (exact match)
* root: no → `server_name .comun.abyaya.la;` (wildcard match)
- stream.conf: Same logic for SSH proxy streams
Problem fixed:
- Previous: `.abyaya.la` matched all subdomains, conflicting with
other vhosts (comun.abyaya.la, sutty.abyaya.la, etc.)
- Now: `abyaya.la www.abyaya.la` matches only root domain exactly
🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add capability to route root domain (abyaya.la and www.abyaya.la)
to sutty.comun while maintaining all existing subdomain routes.
Changes:
- Add no_wildcard flag support in certbot certificate generation
- Split certificate obtention into two conditional paths:
* Standard mode (with wildcard) for subdomains
* No-wildcard mode for root domains
- Add abyaya_root service in matrix routing to sutty.comun
- Include implementation plan as README-root-domain.md
Technical details:
- Certificates for root domain will only include abyaya.la and
www.abyaya.la (no *.abyaya.la wildcard)
- Prevents certificate confusion between root and subdomains
- Maintains clean separation of responsibilities
- All existing subdomain certificates remain unchanged
Generated with Claude Code
En Ansible 2.15+ las variables en el mismo set_fact se evalúan
simultáneamente, no secuencialmente. Separar needs_cert en su propio
set_fact antes de usarlo en needs_vhost y obtain_cert.
Ansible requiere que las condicionales resulten en booleanos.
Agregado filtro | bool para convertir explícitamente strings a booleanos
en las evaluaciones de needs_cert, needs_vhost y obtain_cert.
La limpieza de repositorios Docker antiguos debe ejecutarse SIEMPRE,
incluso cuando se usa --skip-tags=installation, para evitar conflictos
APT antes de que knsupdate u otros roles intenten usar apt.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Soluciona conflicto APT causado por configuraciones de repositorio Docker
duplicadas con valores Signed-By contradictorios. Ahora se eliminan los
archivos de repositorio antiguos antes de agregar la configuración deb822.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Modifica la lógica para garantizar que el dominio .abyaya.la siempre
sea el primero en la lista de dominios, independientemente del orden
definido en abyayala.yml. Esto es crítico para certificados SSL y
configuraciones vhost que dependen de domains[0].
El uso de $host en lugar de $ssl_server_name no es correcto ya que:
- proxy_ssl_verify está deshabilitado, por lo que el SNI no importa
- $ssl_server_name es el valor correcto para SNI en proxies SSL
- $host causaba confusión innecesaria
Revierte a la configuración estándar y correcta.
- Eliminar software-properties-common (no existe en Debian, solo Ubuntu)
- Eliminar apt-transport-https (incluido por defecto en Debian moderno)
- Eliminar gnupg2 (no requerido explícitamente)
- Mantener solo paquetes esenciales: ca-certificates, curl, python3-pip
Cumple con requisitos oficiales de Docker para Debian:
https://docs.docker.com/engine/install/debian/
Compatible con Debian 12 (bookworm) y 13 (trixie)
- Reemplazar 9 usos de local_action con delegate_to: localhost
- 7 cambios en compose.yml (stat, blockinfile, lineinfile)
- 2 cambios en main.yml (file, template)
- Agregar ansible_connection=local en hosts.production para localhost
Beneficios:
- Cumple con mejores prácticas de Ansible
- Sintaxis moderna y no deprecada
- Evita intentos de conexión SSH a localhost
- Mismo comportamiento funcional que local_action
Refs:
- https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_delegation.html
Cambios realizados:
- Instalar Docker Compose v2 via docker-compose-plugin (apt) en lugar de pip
- Especificar paquetes Docker explícitamente: docker-ce, docker-ce-cli, containerd.io, docker-compose-plugin
- Reemplazar instalación de python-docker via pip por python3-docker desde apt
- Eliminar break_system_packages que rompe aislamiento PEP 668
- Eliminar instalación obsoleta de docker-compose via pip
Beneficios:
- Cumple con PEP 668 (externally managed environments)
- Docker Compose v2 más rápido y mejor integrado
- Gestión de paquetes más limpia y mantenible
- Compatible con Debian 12 y 13
Refs:
- https://peps.python.org/pep-0668/
- https://docs.docker.com/compose/install/linux/
- https://packages.debian.org/bookworm/python3-docker
- Reemplaza 'bookworm' hardcodeado con detección automática usando ansible_distribution_release
- Agrega validación explícita que solo permite Debian 12 (bookworm) o 13 (trixie)
- Mensaje de error claro si se intenta usar en versión no soportada
- Comentarios actualizados indicando versiones soportadas
Esto permite que el rol funcione automáticamente en Debian 12 y 13
sin necesidad de cambios manuales en el código.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
# Plan: Añadir Soporte para Dominio Principal www.abyaya.la
## Objetivo
Habilitar que el dominio raíz `abyaya.la` y `www.abyaya.la` apunten al servidor `sutty.comun`, mientras se mantienen funcionando todos los subdominios existentes (ej: `sutty.abyaya.la`, `marmite.abyaya.la`).
## Estrategia de Desarrollo
### Rama Tópica
Los cambios se implementarán en esta rama tópica:
- **Nombre de rama**: `root-domain`
- **Bifurcada desde**: `master`
## Contexto Técnico
### Arquitectura Actual
- **Certificados**: Cada servicio en `abyayala.yml` con `domains` + `nodo` genera un certificado con certbot: `-d DOMAIN -d *.DOMAIN`
- **Patron actual**: Todos los dominios siguen el patrón `subdomain.abyaya.la` (ej: `sutty.abyaya.la`)
### Decisión de Diseño
Crear un **servicio separado** para el dominio raíz con un nuevo flag `root: yes` que indica a certbot que NO solicite el certificado wildcard. Esto mantiene limpia la separación de responsabilidades:
- Servicio `sutty`: maneja `sutty.abyaya.la` y `*.sutty.abyaya.la`
- Servicio `abyaya_root`: maneja únicamente `abyaya.la` y `www.abyaya.la` (sin wildcard)
## Cambios Implementados
### 1. `roles/certbot/tasks/certbot.yml`
- Lee el flag `root` del servicio y lo mapea a variable `is_root_domain`
- Dividido el bloque de certificados en dos tareas condicionales:
- Modo estándar (con wildcard): para subdominios (`when: not is_root_domain`)
- Modo sin wildcard: para dominios raíz (`when: is_root_domain`)
### 2. `roles/proxy/templates/vhost.conf`
- Agregado condicional para manejar flag `root`
- Cuando `root: yes`: genera `server_name` sin punto prefijo (exacto)
- Cuando `root: no` (default): genera `server_name .domain` (con wildcard)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.