From b7c9de76b795feca3c3bbc854419aa9cbf27f930 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: I09b6bf32330a69b815544d7ff7e4c6e459617b54 --- tasks/ironic_install.yml | 14 +++++++------- tasks/ironic_oneview_setup.yml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tasks/ironic_install.yml b/tasks/ironic_install.yml index 0280d759..dda08874 100644 --- a/tasks/ironic_install.yml +++ b/tasks/ironic_install.yml @@ -20,7 +20,7 @@ update_cache: "{{ (ansible_pkg_mgr == 'apt') | 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 @@ -52,7 +52,7 @@ file: path: "{{ ironic_bin | dirname }}" state: absent - when: ironic_get_venv | changed + when: ironic_get_venv is changed - name: Create ironic venv dir file: @@ -60,14 +60,14 @@ state: directory mode: "0755" register: ironic_venv_dir - when: ironic_get_venv | changed + when: ironic_get_venv is changed - name: Unarchive pre-built venv unarchive: src: "/var/cache/{{ ironic_venv_download_url | basename }}" dest: "{{ ironic_bin | dirname }}" copy: "no" - when: ironic_get_venv | changed + when: ironic_get_venv is changed notify: Restart ironic services - name: Install pip packages @@ -81,7 +81,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: ironic_get_venv | failed or ironic_get_venv | skipped @@ -93,7 +93,7 @@ state: "absent" when: - ansible_pkg_mgr in ['yum', 'zypper'] - - ironic_get_venv | changed + - ironic_get_venv is changed # NOTE(odyssey4me): # We reinitialize the venv to ensure that the right @@ -111,7 +111,7 @@ --no-pip \ --no-setuptools \ --no-wheel - when: ironic_get_venv | changed + when: ironic_get_venv is changed tags: - skip_ansible_lint diff --git a/tasks/ironic_oneview_setup.yml b/tasks/ironic_oneview_setup.yml index 394490aa..2b41c303 100644 --- a/tasks/ironic_oneview_setup.yml +++ b/tasks/ironic_oneview_setup.yml @@ -34,7 +34,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