2025-02-21 09:28:01 +01:00
|
|
|
{# Recieves https certificate and setup proxy with domain replace #}
|
2025-02-17 11:04:40 +01:00
|
|
|
|
|
|
|
- name: "include role receive certbot certificate"
|
|
|
|
include_role:
|
2025-02-21 09:28:01 +01:00
|
|
|
name: nginx-https-get-cert
|
2025-02-21 06:32:12 +01:00
|
|
|
vars:
|
|
|
|
domain: "{{domains[application_id]}}"
|
2025-02-17 11:04:40 +01:00
|
|
|
|
2025-02-21 06:32:12 +01:00
|
|
|
- name: configure {{domains[application_id]}}.conf
|
2025-02-17 11:04:40 +01:00
|
|
|
template:
|
|
|
|
src: "roles/nginx-docker-reverse-proxy/templates/domain.conf.j2"
|
2025-02-21 06:32:12 +01:00
|
|
|
dest: "{{nginx.directories.http.servers}}{{domains[application_id]}}.conf"
|
2025-02-17 11:04:40 +01:00
|
|
|
notify: restart nginx
|
|
|
|
vars:
|
2025-02-21 06:32:12 +01:00
|
|
|
nginx_docker_reverse_proxy_extra_configuration: "sub_filter '{{source_domain}}' '{{domains[application_id]}}';"
|