From 2949cae220a47461f52616a5c18412109a414f8c 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: I2f92ab5520fb2e9822fcd0bbc3382305066c5d21 --- handlers/main.yml | 6 +++--- tasks/gnocchi_install.yml | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index e4e7a49..895a9d8 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -24,7 +24,7 @@ - "item.value.group in group_names" - item.value.service_enabled | bool register: _stop - until: _stop | success + until: _stop is success retries: 5 delay: 2 listen: Restart gnocchi services @@ -58,7 +58,7 @@ - "item.value.group in group_names" - item.value.service_enabled | bool register: _start - until: _start | success + until: _start is success retries: 5 delay: 2 listen: Restart gnocchi services @@ -71,6 +71,6 @@ daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}" when: gnocchi_use_mod_wsgi | bool register: _restart - until: _restart | success + until: _restart is success retries: 5 delay: 2 diff --git a/tasks/gnocchi_install.yml b/tasks/gnocchi_install.yml index a327b55..d2050ac 100644 --- a/tasks/gnocchi_install.yml +++ b/tasks/gnocchi_install.yml @@ -20,7 +20,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 @@ -52,7 +52,7 @@ file: path: "{{ gnocchi_bin | dirname }}" state: absent - when: gnocchi_get_venv | changed + when: gnocchi_get_venv is changed - name: Create gnocchi venv dir file: @@ -60,14 +60,14 @@ state: directory mode: "0755" register: gnocchi_venv_dir - when: gnocchi_get_venv | changed + when: gnocchi_get_venv is changed - name: Unarchive pre-built venv unarchive: src: "/var/cache/{{ gnocchi_venv_download_url | basename }}" dest: "{{ gnocchi_bin | dirname }}" copy: "no" - when: gnocchi_get_venv | changed + when: gnocchi_get_venv is changed notify: - Restart gnocchi services - Restart web server @@ -82,7 +82,7 @@ {{ gnocchi_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} {{ pip_install_options | default('') }} register: install_packages - until: install_packages|success + until: install_packages is success retries: 5 delay: 2 when: gnocchi_get_venv | failed or gnocchi_get_venv | skipped @@ -96,7 +96,7 @@ state: "absent" when: - ansible_pkg_mgr in ['yum', 'dnf', 'zypper'] - - gnocchi_get_venv | changed + - gnocchi_get_venv is changed # NOTE(odyssey4me): # We reinitialize the venv to ensure that the right @@ -114,7 +114,7 @@ --no-pip \ --no-setuptools \ --no-wheel - when: gnocchi_get_venv | changed + when: gnocchi_get_venv is changed tags: - skip_ansible_lint