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: I6749670146cc64cb39b67efb26a9226208828ae7
This commit is contained in:
Jean-Philippe Evrard 2018-07-12 16:44:20 +02:00
parent 3ffa50e1c6
commit fb2802d2e4
5 changed files with 11 additions and 11 deletions

View File

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

View File

@ -84,7 +84,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: "{{ glance_bin | dirname }}"
state: absent
when: glance_get_venv | changed
when: glance_get_venv is changed
- name: Create glance venv dir
file:
path: "{{ glance_bin | dirname }}"
state: directory
register: glance_venv_dir
when: glance_get_venv | changed
when: glance_get_venv is changed
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ glance_venv_download_url | basename }}"
dest: "{{ glance_bin | dirname }}"
copy: "no"
when: glance_get_venv | changed
when: glance_get_venv is changed
notify:
- Manage LB
- Restart glance 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: glance_get_venv | failed or glance_get_venv | skipped
@ -85,7 +85,7 @@
state: "absent"
when:
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
- glance_get_venv | changed
- glance_get_venv is changed
# NOTE(odyssey4me):
# We reinitialize the venv to ensure that the right
@ -103,7 +103,7 @@
--no-pip \
--no-setuptools \
--no-wheel
when: glance_get_venv | changed
when: glance_get_venv is changed
tags:
- skip_ansible_lint

View File

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

View File

@ -71,7 +71,7 @@
enabled: "yes"
state: "restarted"
when:
- nfs_exportfs | changed
- nfs_exportfs is changed
- name: Export NFS
command: exportfs -rav