From 21c5b0be2d5eb368d3b35889fb5fe3876dce0c23 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Tue, 23 Jun 2020 11:03:52 +0200 Subject: [PATCH] zuul: use the correct syntax for a jinja test (non filter) The usage of jinja tests as filters was deprecated in Ansible 2.5 and removed in Ansible 2.9 (now used by zuul). https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.5.html#jinja-tests-used-as-filters Change-Id: I21684c3f0ae9ee9e67359b504d99679cfaa5ee13 --- roles/setup-sahara-scenario-env/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/setup-sahara-scenario-env/tasks/main.yaml b/roles/setup-sahara-scenario-env/tasks/main.yaml index dcf45116..091d9412 100644 --- a/roles/setup-sahara-scenario-env/tasks/main.yaml +++ b/roles/setup-sahara-scenario-env/tasks/main.yaml @@ -6,12 +6,12 @@ get_url: url: "{{ sahara_image_url }}" dest: "{{ sahara_image_path }}" - when: sahara_image_url is defined and sahara_image_url!='' and sahara_image_url|search('^http') + when: sahara_image_url is defined and sahara_image_url!='' and sahara_image_url is search('^http') - name: set sahara_image_path from the local file set_fact: sahara_image_path: "{{ sahara_image_url }}" - when: sahara_image_url is defined and sahara_image_url!='' and not sahara_image_url|search('^http') + when: sahara_image_url is defined and sahara_image_url!='' and not sahara_image_url is search('^http') # we cannot use os_image because Ansible 2.7 requires a newer version of # openstacksdk than the one available in queens and pike.