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

View File

@ -21,7 +21,7 @@
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
with_items: "{{ filtered_cinder_services }}"
register: _stop
until: _stop | success
until: _stop is success
retries: 5
delay: 2
listen: Restart cinder services
@ -52,7 +52,7 @@
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
with_items: "{{ filtered_cinder_services }}"
register: _start
until: _start | success
until: _start is success
retries: 5
delay: 2
listen: Restart cinder services

View File

@ -19,7 +19,7 @@
status_code: 200,300
validate_certs: "{{ cinder_service_internaluri_insecure | bool }}"
register: api_status
until: api_status | success
until: api_status is success
retries: 10
delay: 10

View File

@ -63,4 +63,4 @@
value: False
when:
- not data_migrations | skipped
- data_migrations | succeeded
- data_migrations is succeeded

View File

@ -32,7 +32,7 @@
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | 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

View File

@ -41,21 +41,21 @@
file:
path: "{{ cinder_bin | dirname }}"
state: absent
when: cinder_get_venv | changed
when: cinder_get_venv is changed
- name: Create cinder venv dir
file:
path: "{{ cinder_bin | dirname }}"
state: directory
register: cinder_venv_dir
when: cinder_get_venv | changed
when: cinder_get_venv is changed
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ cinder_venv_download_url | basename }}"
dest: "{{ cinder_bin | dirname }}"
copy: "no"
when: cinder_get_venv | changed
when: cinder_get_venv is changed
notify:
- Manage LB
- Restart cinder services
@ -71,7 +71,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: cinder_get_venv | failed or cinder_get_venv | skipped
@ -98,7 +98,7 @@
state: "absent"
when:
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
- cinder_get_venv | changed
- cinder_get_venv is changed
# NOTE(odyssey4me):
# We reinitialize the venv to ensure that the right
@ -116,7 +116,7 @@
--no-pip \
--no-setuptools \
--no-wheel
when: cinder_get_venv | changed
when: cinder_get_venv is changed
tags:
- skip_ansible_lint

View File

@ -28,4 +28,4 @@
- name: Apply updated SELinux contexts on cinder log directory
command: "restorecon -Rv {{ (cinder_log_dir_check.stat.islnk) | ternary(cinder_log_dir_check.stat.lnk_target, cinder_log_dir) }}"
when:
- selinux_file_context_log_files | changed
- selinux_file_context_log_files is changed

View File

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