diff --git a/roles/servicetelemetry/tasks/component_clouds.yml b/roles/servicetelemetry/tasks/component_clouds.yml index 9db8615ab..52c00f659 100644 --- a/roles/servicetelemetry/tasks/component_clouds.yml +++ b/roles/servicetelemetry/tasks/component_clouds.yml @@ -41,13 +41,13 @@ - name: Set elastic_tls_server_name from forwarding config if set set_fact: elastic_tls_server_name: "{{ servicetelemetry_vars.backends.events.elasticsearch.forwarding.tls_server_name }}" - when: servicetelemetry_vars.backends.events.elasticsearch.forwarding.tls_server_name != "" + when: servicetelemetry_vars.backends.events.elasticsearch.forwarding.tls_server_name | length > 0 # This sets the server name based on the host part of the URL between // and : (https://elasticsearch-host:9200) - name: Set elastic_tls_server_name by parsing the host_url if it's not set in the config set_fact: elastic_tls_server_name: "{{ servicetelemetry_vars.backends.events.elasticsearch.forwarding.host_url.rpartition('//')[-1].partition(':')[0] }}" - when: servicetelemetry_vars.backends.events.elasticsearch.forwarding.tls_server_name == "" + when: servicetelemetry_vars.backends.events.elasticsearch.forwarding.tls_server_name | length == 0 - name: Get the Elasticsearch TLS materials secret k8s_info: