From 05e7ee39569335a1c19b092b4a6d2d5b196d3805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20D=C3=A9siles?= <1536672+cdesiles@users.noreply.github.com> Date: Fri, 29 May 2026 21:27:00 +0200 Subject: [PATCH] fix: tls for static web --- roles/static_web/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/static_web/tasks/main.yml b/roles/static_web/tasks/main.yml index 69ecb53..9af4a77 100644 --- a/roles/static_web/tasks/main.yml +++ b/roles/static_web/tasks/main.yml @@ -54,6 +54,15 @@ become_user: "{{ nginx_user }}" changed_when: true +- name: Provision TLS certificates for static web sites + ansible.builtin.include_tasks: "{{ role_path }}/../nginx/tasks/certbot.yml" + vars: + certbot_hostname: "{{ item.key }}" + loop: "{{ static_web_sites | dict2items }}" + when: + - static_web_sites | length > 0 + - item.value.ssl_enabled | default(true) + - name: Deploy nginx vhost configurations ansible.builtin.template: src: nginx-vhost.conf.j2