From 4b7379914a1865f07b2c54252234cc90158fc253 Mon Sep 17 00:00:00 2001 From: Miguel Dalberto Pedro Date: Thu, 29 Oct 2026 12:48:06 -0300 Subject: feat(iac): establish Ansible baseline for Nginx, SearXNG, Valkey, and Certbot - Reverse-engineer live Debian 13 (trixie) VPS state at miguelpedro.xyz.br - Add modular Ansible roles: common, certbot, valkey, searxng, and nginx - Encrypt SearXNG secret_key using ansible-vault in group_vars/all/vault.yml - Cleanly remove unused example.com Nginx stub symlink (sites-enabled/miguelpedro.xyz.br) - Scaffold cgit + fcgiwrap role (cgit_enabled: false) for upcoming deployment - Add DISCOVERY_REPORT.md, COMMAND_LOG.md, README.md, and AGENT_INSTRUCTIONS.md with Self-Updating Protocol --- roles/certbot/tasks/main.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 roles/certbot/tasks/main.yml (limited to 'roles/certbot') diff --git a/roles/certbot/tasks/main.yml b/roles/certbot/tasks/main.yml new file mode 100644 index 0000000..02e8c0b --- /dev/null +++ b/roles/certbot/tasks/main.yml @@ -0,0 +1,23 @@ +--- +- name: Ensure Certbot and Nginx plugin are installed + ansible.builtin.apt: + name: + - certbot + - python3-certbot-nginx + state: present + +- name: Ensure certbot renewal timer is enabled and active + ansible.builtin.systemd: + name: certbot.timer + enabled: true + state: started + +- name: Verify primary domain TLS certificate exists + ansible.builtin.stat: + path: "/etc/letsencrypt/live/{{ primary_domain }}/fullchain.pem" + register: primary_cert + +- name: Verify SearXNG domain TLS certificate exists + ansible.builtin.stat: + path: "/etc/letsencrypt/live/{{ searxng_domain }}/fullchain.pem" + register: searxng_cert -- cgit v1.2.3