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

View File

@ -20,7 +20,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
@ -52,7 +52,7 @@
file:
path: "{{ ironic_bin | dirname }}"
state: absent
when: ironic_get_venv | changed
when: ironic_get_venv is changed
- name: Create ironic venv dir
file:
@ -60,14 +60,14 @@
state: directory
mode: "0755"
register: ironic_venv_dir
when: ironic_get_venv | changed
when: ironic_get_venv is changed
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ ironic_venv_download_url | basename }}"
dest: "{{ ironic_bin | dirname }}"
copy: "no"
when: ironic_get_venv | changed
when: ironic_get_venv is changed
notify: Restart ironic services
- name: Install pip packages
@ -81,7 +81,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: ironic_get_venv | failed or ironic_get_venv | skipped
@ -93,7 +93,7 @@
state: "absent"
when:
- ansible_pkg_mgr in ['yum', 'zypper']
- ironic_get_venv | changed
- ironic_get_venv is changed
# NOTE(odyssey4me):
# We reinitialize the venv to ensure that the right
@ -111,7 +111,7 @@
--no-pip \
--no-setuptools \
--no-wheel
when: ironic_get_venv | changed
when: ironic_get_venv is changed
tags:
- skip_ansible_lint

View File

@ -34,7 +34,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