Added get_domain function

This commit is contained in:
2025-05-17 14:53:55 +02:00
parent ad51597e2e
commit 3388d3c592
94 changed files with 288 additions and 141 deletions

View File

@@ -3,7 +3,7 @@
include_role:
name: docker-central-database
- name: "include tasks setup-domain.yml with {{domains[application_id]}}"
- name: "include tasks setup-domain.yml with {{domains | get_domain(application_id)}}"
include_tasks: setup-domain.yml
loop: "{{ mybb_domains + [source_domain] }}"
loop_control:

View File

@@ -4,12 +4,12 @@
include_role:
name: nginx-https-get-cert
vars:
domain: "{{domains[application_id]}}"
domain: "{{domains | get_domain(application_id)}}"
- name: configure {{domains[application_id]}}.conf
- name: configure {{domains | get_domain(application_id)}}.conf
template:
src: "roles/nginx-docker-reverse-proxy/templates/vhost/basic.conf.j2"
dest: "{{nginx.directories.http.servers}}{{domains[application_id]}}.conf"
dest: "{{nginx.directories.http.servers}}{{domains | get_domain(application_id)}}.conf"
notify: restart nginx
vars:
nginx_docker_reverse_proxy_extra_configuration: "sub_filter '{{source_domain}}' '{{domains[application_id]}}';"
nginx_docker_reverse_proxy_extra_configuration: "sub_filter '{{source_domain}}' '{{domains | get_domain(application_id)}}';"