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

@ -19,7 +19,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_authentication_service_syn2mas_synapse_homeserver_config_path', when: true}

View File

@ -9,7 +9,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_authentication_service_hostname', when: true}
- {'name': 'matrix_authentication_service_config_database_username', when: true}

View File

@ -17,7 +17,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_element_call_container_network', when: true}
- {'name': 'matrix_element_call_hostname', when: true}

View File

@ -10,7 +10,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_livekit_jwt_service_hostname', when: true}
- {'name': 'matrix_livekit_jwt_service_container_network', when: true}

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 }}"}

View File

@ -10,7 +10,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_synapse_username', when: true}
- {'name': 'matrix_synapse_uid', when: true}