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: I38d658d79cfc43e0096d4ffc092410ea22410872
This commit is contained in:
Jean-Philippe Evrard 2018-07-12 16:44:21 +02:00 committed by Jesse Pretorius (odyssey4me)
parent 5eae47074a
commit 0a15c5ecb2
2 changed files with 15 additions and 15 deletions

View File

@ -20,7 +20,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
@ -42,7 +42,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
@ -65,7 +65,7 @@
file:
path: "{{ magnum_bin | dirname }}"
state: absent
when: magnum_get_venv | changed
when: magnum_get_venv is changed
- name: Create magnum venv dir
file:
@ -73,14 +73,14 @@
state: directory
mode: "0755"
register: magnum_venv_dir
when: magnum_get_venv | changed
when: magnum_get_venv is changed
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ magnum_venv_download_url | basename }}"
dest: "{{ magnum_bin | dirname }}"
copy: "no"
when: magnum_get_venv | changed
when: magnum_get_venv is changed
notify: Restart magnum services
- name: Install pip packages
@ -94,7 +94,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: magnum_get_venv | failed or magnum_get_venv | skipped
@ -106,7 +106,7 @@
state: "absent"
when:
- ansible_pkg_mgr in ['yum', 'zypper']
- magnum_get_venv | changed
- magnum_get_venv is changed
# NOTE(odyssey4me):
# We reinitialize the venv to ensure that the right
@ -124,7 +124,7 @@
--no-pip \
--no-setuptools \
--no-wheel
when: magnum_get_venv | changed
when: magnum_get_venv is changed
tags:
- skip_ansible_lint

View File

@ -25,7 +25,7 @@
service_type: "{{ magnum_service_type }}"
description: "{{ magnum_service_description }}"
register: add_magnum_service
until: add_magnum_service |success
until: add_magnum_service is success
retries: 5
delay: 2
no_log: True
@ -42,7 +42,7 @@
tenant_name: "{{ magnum_service_project_name }}"
password: "{{ magnum_service_password |default('changeme') }}"
register: add_magnum_user
until: add_magnum_user |success
until: add_magnum_user is success
retries: 5
delay: 2
no_log: True
@ -59,7 +59,7 @@
role_name: "{{ item }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: ensure_magnum_roles
until: ensure_magnum_roles |success
until: ensure_magnum_roles is success
retries: 5
delay: 2
with_items: "{{ magnum_service_role_names }}"
@ -84,7 +84,7 @@
- url: "{{ magnum_service_adminurl }}"
interface: "admin"
register: add_magnum_endpoints
until: add_magnum_endpoints |success
until: add_magnum_endpoints is success
retries: 5
delay: 2
no_log: True
@ -100,7 +100,7 @@
domain_name: "{{ magnum_trustee_domain_name }}"
domain_enabled: true
register: add_magnum_trustee_user
until: add_magnum_trustee_user |success
until: add_magnum_trustee_user is success
retries: 5
delay: 2
no_log: True
@ -118,7 +118,7 @@
project_name: "{{ magnum_service_project_name }}"
password: "{{ magnum_trustee_password |default('changeme') }}"
register: add_magnum_trustee_user
until: add_magnum_trustee_user |success
until: add_magnum_trustee_user is success
retries: 5
delay: 2
no_log: True
@ -135,7 +135,7 @@
domain_name: "{{ magnum_trustee_domain_name }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: ensure_magnum_trustee_roles
until: ensure_magnum_trustee_roles |success
until: ensure_magnum_trustee_roles is success
retries: 5
delay: 2
with_items: "{{ magnum_trustee_domain_admin_roles }}"