From d25f899c43564d9b8730d555605991313266e24a 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: I7a5b4cf134a73e9dc6eda08c935696c5b8b8a034 --- handlers/main.yml | 4 ++-- tasks/install-apt.yml | 2 +- tasks/zaqar_install.yml | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 703f676..51bcaae 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -25,7 +25,7 @@ state: "restarted" pattern: "apache2" register: apache_restart - until: apache_restart|success + until: apache_restart is success retries: 5 delay: 2 @@ -35,6 +35,6 @@ state: "restarted" pattern: "nginx" register: nginx_restart - until: nginx_restart|success + until: nginx_restart is success retries: 5 delay: 2 diff --git a/tasks/install-apt.yml b/tasks/install-apt.yml index 395cd3c..3c00995 100644 --- a/tasks/install-apt.yml +++ b/tasks/install-apt.yml @@ -20,7 +20,7 @@ update_cache: yes cache_valid_time: "{{ cache_timeout }}" register: install_apt_packages - until: install_apt_packages | success + until: install_apt_packages is success retries: 5 delay: 2 with_items: "{{ zaqar_distro_packages }}" diff --git a/tasks/zaqar_install.yml b/tasks/zaqar_install.yml index d38e8c5..d3b4b67 100644 --- a/tasks/zaqar_install.yml +++ b/tasks/zaqar_install.yml @@ -68,7 +68,7 @@ file: path: "{{ zaqar_bin | dirname }}" state: absent - when: zaqar_get_venv | changed + when: zaqar_get_venv is changed tags: - zaqar-install - zaqar-pip-packages @@ -78,7 +78,7 @@ path: "{{ zaqar_bin | dirname }}" state: directory register: zaqar_venv_dir - when: zaqar_get_venv | changed + when: zaqar_get_venv is changed tags: - zaqar-install - zaqar-pip-packages @@ -88,7 +88,7 @@ src: "/var/cache/{{ zaqar_venv_download_url | basename }}" dest: "{{ zaqar_bin | dirname }}" copy: "no" - when: zaqar_get_venv | changed + when: zaqar_get_venv is changed # notify: # - Restart zaqar api tags: @@ -106,7 +106,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: zaqar_get_venv | failed or zaqar_get_venv | skipped @@ -132,7 +132,7 @@ --no-pip \ --no-setuptools \ --no-wheel - when: zaqar_get_venv | changed + when: zaqar_get_venv is changed tags: - skip_ansible_lint - zaqar-install