From d52c780a8d889afcf466c405c2c9489e59f9121b Mon Sep 17 00:00:00 2001 From: okozachenko Date: Sun, 24 May 2020 06:14:04 +0300 Subject: [PATCH] Fix the ip getting tasks in tests The current failed_when condition for getting ips is allowing the empty string for the ip. It leads to the error in ping tasks against to them Change-Id: If117039c427e60ced64fc9490ff22029db67815b --- playbooks/functional/tests/memcached.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/playbooks/functional/tests/memcached.yaml b/playbooks/functional/tests/memcached.yaml index 4b30a829..354e8493 100644 --- a/playbooks/functional/tests/memcached.yaml +++ b/playbooks/functional/tests/memcached.yaml @@ -27,7 +27,9 @@ until: _memcached_ips is success retries: 10 delay: 5 - failed_when: "{{ _memcached_ips.stdout_lines | length == 0 }}" + failed_when: | + {{ _memcached_ips.stdout_lines | length == 0 }} or + {{ "" in _memcached_ips.stdout_lines }} - name: Send request to Memcached exporter uri: @@ -46,7 +48,9 @@ until: _mcrouter_ips is success retries: 10 delay: 5 - failed_when: "{{ _mcrouter_ips.stdout_lines | length == 0 }}" + failed_when: | + {{ _mcrouter_ips.stdout_lines | length == 0 }} or + {{ "" in _mcrouter_ips.stdout_lines }} - name: Send request to Mcrouter exporter uri: