From 7fbcb8c98b5e32f84f4d9cb00d6b50afefb73ab5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Thu, 12 Jul 2018 16:44:21 +0200 Subject: [PATCH] Fix usage of "|" for tests With the more recent versions of ansible, we should now use "is" instead of the "|" sign for the tests. This should fix it. Change-Id: Ib42bf56d7151f5af957041e4e61b7cf646819565 --- tasks/sahara_install.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tasks/sahara_install.yml b/tasks/sahara_install.yml index c9037cd..8a1bb68 100644 --- a/tasks/sahara_install.yml +++ b/tasks/sahara_install.yml @@ -18,7 +18,7 @@ update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}" cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}" register: install_packages - until: install_packages|success + until: install_packages is success retries: 5 delay: 2 with_items: "{{ sahara_distro_packages }}" @@ -52,7 +52,7 @@ file: path: "{{ sahara_bin | dirname }}" state: absent - when: sahara_get_venv | changed + when: sahara_get_venv is changed - name: Create sahara venv dir file: @@ -60,14 +60,14 @@ state: directory mode: "0755" register: sahara_venv_dir - when: sahara_get_venv | changed + when: sahara_get_venv is changed - name: Unarchive pre-built venv unarchive: src: "/var/cache/{{ sahara_venv_download_url | basename }}" dest: "{{ sahara_bin | dirname }}" copy: "no" - when: sahara_get_venv | changed + when: sahara_get_venv is changed notify: - Restart sahara services @@ -82,7 +82,7 @@ {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ pip_install_options | default('') }} register: install_packages - until: install_packages|success + until: install_packages is success retries: 5 delay: 2 when: sahara_get_venv | failed or sahara_get_venv | skipped @@ -95,7 +95,7 @@ state: "absent" when: - ansible_pkg_mgr in ['yum', 'zypper'] - - sahara_get_venv | changed + - sahara_get_venv is changed # NOTE(odyssey4me): # We reinitialize the venv to ensure that the right @@ -113,7 +113,7 @@ --no-pip \ --no-setuptools \ --no-wheel - when: sahara_get_venv | changed + when: sahara_get_venv is changed tags: - skip_ansible_lint