From 6930b5a2cc38f7df8a4c72c91f214983fb7ade5c 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: Id12b96c1973b3823f9b02e069522795a958fd319 --- tasks/monasca_agent_install.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tasks/monasca_agent_install.yml b/tasks/monasca_agent_install.yml index 63c01f8..ffb9c70 100644 --- a/tasks/monasca_agent_install.yml +++ b/tasks/monasca_agent_install.yml @@ -18,7 +18,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 @@ -40,7 +40,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 @@ -63,21 +63,21 @@ file: path: "{{ monasca_agent_bin | dirname }}" state: absent - when: monasca_agent_get_venv | changed + when: monasca_agent_get_venv is changed - name: Create monasca-agent venv dir file: path: "{{ monasca_agent_bin | dirname }}" state: directory register: monasca_agent_venv_dir - when: monasca_agent_get_venv | changed + when: monasca_agent_get_venv is changed - name: Unarchive pre-built venv unarchive: src: "/var/cache/{{ monasca_agent_venv_download_url | basename }}" dest: "{{ monasca_agent_bin | dirname }}" copy: "no" - when: monasca_agent_get_venv | changed + when: monasca_agent_get_venv is changed notify: - Restart monasca-agent services @@ -92,7 +92,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: monasca_agent_get_venv | failed or monasca_agent_get_venv | skipped @@ -105,7 +105,7 @@ state: "absent" when: - ansible_pkg_mgr == 'yum' - - monasca_agent_get_venv | changed + - monasca_agent_get_venv is changed # NOTE(odyssey4me): # We reinitialize the venv to ensure that the right @@ -123,6 +123,6 @@ --no-pip \ --no-setuptools \ --no-wheel - when: monasca_agent_get_venv | changed + when: monasca_agent_get_venv is changed tags: - skip_ansible_lint