From 7f58c50bf3aaefae6e27144a8b008d9d0f080a7d 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: If684a4bf85249a4eb5372cb69365fb79423326db --- tasks/python_venv_build.yml | 12 ++++++------ tasks/python_venv_install.yml | 6 +++--- tests/test-functional.yml | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tasks/python_venv_build.yml b/tasks/python_venv_build.yml index 809e936..cfc10ab 100644 --- a/tasks/python_venv_build.yml +++ b/tasks/python_venv_build.yml @@ -23,7 +23,7 @@ - (venv_build_distro_package_list | length > 0) or (venv_install_distro_package_list | length > 0) register: _install_distro_packages - until: _install_distro_packages | success + until: _install_distro_packages is success retries: 5 delay: 2 @@ -73,7 +73,7 @@ --log /var/log/python_venv_build.log {{ venv_pip_install_args }} register: _install_venv_pip_packages - until: _install_venv_pip_packages | success + until: _install_venv_pip_packages is success retries: 5 delay: 2 notify: @@ -89,7 +89,7 @@ find {{ venv_install_destination_path }}/bin -type f -name '*.pyc' -delete when: - _install_venv_pip_packages is mapping - - _install_venv_pip_packages | changed + - _install_venv_pip_packages is changed # Note(odyssey4me): # We purposefully use shell instead of the archive module @@ -104,7 +104,7 @@ register: _venv_package_build when: - _install_venv_pip_packages is mapping - - _install_venv_pip_packages | changed + - _install_venv_pip_packages is changed - name: Prepare checksum for packaged venv shell: | @@ -113,7 +113,7 @@ executable: /bin/bash when: - _venv_package_build is mapping - - _venv_package_build | changed + - _venv_package_build is changed - name: Ensure that venv_install_source_path exists on the deployment host file: @@ -140,5 +140,5 @@ when: - _venv_source == 'file' - _venv_package_build is mapping - - _venv_package_build | changed + - _venv_package_build is changed - inventory_hostname != 'localhost' diff --git a/tasks/python_venv_install.yml b/tasks/python_venv_install.yml index 13b4ae0..7cadd19 100644 --- a/tasks/python_venv_install.yml +++ b/tasks/python_venv_install.yml @@ -22,7 +22,7 @@ when: - venv_install_distro_package_list | length > 0 register: _install_distro_packages - until: _install_distro_packages | success + until: _install_distro_packages is success retries: 5 delay: 2 @@ -85,7 +85,7 @@ when: - (_venv_checksum_copy is mapping and _venv_checksum_copy | changed) or (_venv_checksum_download is mapping and _venv_checksum_download | changed) or - _venv_dir_create | changed + _venv_dir_create is changed notify: - venv changed @@ -110,6 +110,6 @@ when: - (_venv_checksum_copy is mapping and _venv_checksum_copy | changed) or (_venv_checksum_download is mapping and _venv_checksum_download | changed) or - _venv_dir_create | changed + _venv_dir_create is changed tags: - skip_ansible_lint diff --git a/tests/test-functional.yml b/tests/test-functional.yml index 9dfd0c6..2647fdf 100644 --- a/tests/test-functional.yml +++ b/tests/test-functional.yml @@ -69,7 +69,7 @@ when: - ansible_pkg_mgr in ['yum', 'dnf'] register: _add_yum_keys - until: _add_yum_keys | success + until: _add_yum_keys is success retries: 5 delay: 2 @@ -85,7 +85,7 @@ when: - ansible_pkg_mgr in ['yum', 'dnf'] register: install_epel_repo - until: install_epel_repo | success + until: install_epel_repo is success retries: 5 delay: 2 @@ -94,7 +94,7 @@ name: "nginx" update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}" register: install - until: install | success + until: install is success retries: 5 delay: 2