1
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2025-08-04 21:43:06 +02:00

Cast variables to string before running length on them when checking if a variable contains a value

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/4445
This commit is contained in:
Slavi Pantaleev
2025-07-26 18:11:08 +03:00
parent 2ee0826079
commit f2524902af
6 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@
ansible.builtin.fail:
msg: >-
You need to define a required configuration setting (`{{ item.name }}`).
when: "item.when | bool and vars[item.name] | length == 0"
when: "item.when | bool and vars[item.name] | string | length == 0"
with_items:
- {'name': 'matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_hostname', when: "{{ matrix_static_files_container_labels_well_known_matrix_endpoint_enabled }}"}
- {'name': 'matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_path_prefix', when: "{{ matrix_static_files_container_labels_well_known_matrix_endpoint_enabled }}"}