mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-25 02:18:31 +01:00
Rename variable for consistency (matrix_static_files_ident -> matrix_static_files_identifier)
This commit is contained in:
parent
ea992496a3
commit
2f27a57d00
@ -397,7 +397,7 @@ devture_systemd_service_manager_services_list_auto: |
|
||||
+
|
||||
([{'name': 'matrix-user-verification-service.service', 'priority': 800, 'groups': ['matrix', 'matrix-user-verification-service']}] if matrix_user_verification_service_enabled else [])
|
||||
+
|
||||
([{'name': (matrix_static_files_ident + '.service'), 'priority': 4000, 'groups': ['matrix', 'matrix-static-files']}] if matrix_static_files_enabled else [])
|
||||
([{'name': (matrix_static_files_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'matrix-static-files']}] if matrix_static_files_enabled else [])
|
||||
+
|
||||
([{'name': (devture_container_socket_proxy_identifier + '.service'), 'priority': 2900, 'groups': ['matrix', 'reverse-proxies', 'container-socket-proxy']}] if devture_container_socket_proxy_enabled else [])
|
||||
+
|
||||
|
@ -5,12 +5,12 @@
|
||||
|
||||
matrix_static_files_enabled: true
|
||||
|
||||
matrix_static_files_ident: matrix-static-files
|
||||
matrix_static_files_identifier: matrix-static-files
|
||||
|
||||
# renovate: datasource=docker depName=joseluisq/static-web-server
|
||||
matrix_static_files_version: 2.24.2
|
||||
|
||||
matrix_static_files_base_path: "{{ matrix_base_data_path }}/{{ 'static-files' if matrix_static_files_ident == 'matrix-static-files' else matrix_static_files_ident }}"
|
||||
matrix_static_files_base_path: "{{ matrix_base_data_path }}/{{ 'static-files' if matrix_static_files_identifier == 'matrix-static-files' else matrix_static_files_identifier }}"
|
||||
matrix_static_files_config_path: "{{ matrix_static_files_base_path }}/config"
|
||||
matrix_static_files_public_path: "{{ matrix_static_files_base_path }}/public"
|
||||
matrix_static_files_public_well_known_path: "{{ matrix_static_files_public_path }}/.well-known"
|
||||
@ -28,7 +28,7 @@ matrix_static_files_container_image: "{{ matrix_container_global_registry_prefix
|
||||
matrix_static_files_container_image_tag: "{{ 'latest' if matrix_static_files_version == 'latest' else (matrix_static_files_version + '-alpine') }}"
|
||||
matrix_static_files_container_image_force_pull: "{{ matrix_static_files_container_image.endswith(':latest') }}"
|
||||
|
||||
matrix_static_files_container_network: "{{ matrix_static_files_ident }}"
|
||||
matrix_static_files_container_network: "{{ matrix_static_files_identifier }}"
|
||||
|
||||
# A list of additional container networks that matrix-static-files would be connected to.
|
||||
# The playbook does not create these networks, so make sure they already exist.
|
||||
|
@ -89,5 +89,5 @@
|
||||
- name: Ensure matrix-static-files systemd service is installed
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-static-files.service.j2"
|
||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrix_static_files_ident }}.service"
|
||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrix_static_files_identifier }}.service"
|
||||
mode: 0644
|
||||
|
@ -2,21 +2,21 @@
|
||||
|
||||
- name: Check existence of matrix-static-files systemd service
|
||||
ansible.builtin.stat:
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrix_static_files_ident }}.service"
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrix_static_files_identifier }}.service"
|
||||
register: matrix_static_files_service_stat
|
||||
|
||||
- when: matrix_static_files_service_stat.stat.exists | bool
|
||||
block:
|
||||
- name: Ensure matrix-static-files systemd service is stopped
|
||||
ansible.builtin.service:
|
||||
name: "{{ matrix_static_files_ident }}"
|
||||
name: "{{ matrix_static_files_identifier }}"
|
||||
state: stopped
|
||||
enabled: false
|
||||
daemon_reload: true
|
||||
|
||||
- name: Ensure matrix-static-files systemd service doesn't exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrix_static_files_ident }}.service"
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrix_static_files_identifier }}.service"
|
||||
state: absent
|
||||
|
||||
- name: Ensure matrix-static-files directory is deleted
|
||||
|
@ -5,7 +5,7 @@ traefik.enable=true
|
||||
traefik.docker.network={{ matrix_static_files_container_labels_traefik_docker_network }}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.services.{{ matrix_static_files_ident }}.loadbalancer.server.port={{ matrix_static_files_environment_variable_server_port }}
|
||||
traefik.http.services.{{ matrix_static_files_identifier }}.loadbalancer.server.port={{ matrix_static_files_environment_variable_server_port }}
|
||||
|
||||
|
||||
{#
|
||||
@ -16,27 +16,27 @@ traefik.http.services.{{ matrix_static_files_ident }}.loadbalancer.server.port={
|
||||
{% set well_known_matrix_endpoint_middlewares = [] %}
|
||||
|
||||
{% if matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_enabled %}
|
||||
traefik.http.middlewares.{{ matrix_static_files_ident }}-well-known-endpoint-compress.compress=true
|
||||
traefik.http.middlewares.{{ matrix_static_files_ident }}-well-known-endpoint-compress.compress.minResponseBodyBytes={{ matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_minResponseBodyBytes }}
|
||||
{% set well_known_matrix_endpoint_middlewares = well_known_matrix_endpoint_middlewares + [matrix_static_files_ident + '-well-known-endpoint-compress'] %}
|
||||
traefik.http.middlewares.{{ matrix_static_files_identifier }}-well-known-endpoint-compress.compress=true
|
||||
traefik.http.middlewares.{{ matrix_static_files_identifier }}-well-known-endpoint-compress.compress.minResponseBodyBytes={{ matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_minResponseBodyBytes }}
|
||||
{% set well_known_matrix_endpoint_middlewares = well_known_matrix_endpoint_middlewares + [matrix_static_files_identifier + '-well-known-endpoint-compress'] %}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.rule={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_rule }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.rule={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_rule }}
|
||||
|
||||
{% if well_known_matrix_endpoint_middlewares | length > 0 %}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.middlewares={{ well_known_matrix_endpoint_middlewares | join(',') }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.middlewares={{ well_known_matrix_endpoint_middlewares | join(',') }}
|
||||
{% endif %}
|
||||
|
||||
{% if matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority | int > 0 %}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.priority={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.priority={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority }}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.service={{ matrix_static_files_ident }}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.entrypoints={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_entrypoints }}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.tls={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls | to_json }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.service={{ matrix_static_files_identifier }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.entrypoints={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_entrypoints }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.tls={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls | to_json }}
|
||||
|
||||
{% if matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls %}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.tls.certResolver={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls_certResolver }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.tls.certResolver={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
@ -49,18 +49,18 @@ traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.tls.cer
|
||||
Base domain serving
|
||||
#}
|
||||
{% if matrix_static_files_container_labels_base_domain_enabled %}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-base-domain.rule={{ matrix_static_files_container_labels_base_domain_traefik_rule }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.rule={{ matrix_static_files_container_labels_base_domain_traefik_rule }}
|
||||
|
||||
{% if matrix_static_files_container_labels_base_domain_traefik_priority | int > 0 %}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-base-domain.priority={{ matrix_static_files_container_labels_base_domain_traefik_priority }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.priority={{ matrix_static_files_container_labels_base_domain_traefik_priority }}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-base-domain.service={{ matrix_static_files_ident }}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-base-domain.entrypoints={{ matrix_static_files_container_labels_base_domain_traefik_entrypoints }}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-base-domain.tls={{ matrix_static_files_container_labels_base_domain_traefik_tls | to_json }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.service={{ matrix_static_files_identifier }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.entrypoints={{ matrix_static_files_container_labels_base_domain_traefik_entrypoints }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.tls={{ matrix_static_files_container_labels_base_domain_traefik_tls | to_json }}
|
||||
|
||||
{% if matrix_static_files_container_labels_base_domain_traefik_tls %}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-base-domain.tls.certResolver={{ matrix_static_files_container_labels_base_domain_traefik_tls_certResolver }}
|
||||
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.tls.certResolver={{ matrix_static_files_container_labels_base_domain_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user