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
This commit is contained in:
Jean-Philippe Evrard 2018-07-12 16:44:21 +02:00
parent a72c53d47e
commit 7f58c50bf3
3 changed files with 12 additions and 12 deletions

View File

@ -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'

View File

@ -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

View File

@ -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