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

View File

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

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
@ -43,7 +43,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
when: install_test_packages|bool

View File

@ -31,7 +31,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
@ -54,7 +54,7 @@
file:
path: "{{ aodh_bin | dirname }}"
state: absent
when: aodh_get_venv | changed
when: aodh_get_venv is changed
- name: Create aodh venv dir
file:
@ -62,14 +62,14 @@
state: directory
mode: "0755"
register: aodh_venv_dir
when: aodh_get_venv | changed
when: aodh_get_venv is changed
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ aodh_venv_download_url | basename }}"
dest: "{{ aodh_bin | dirname }}"
copy: "no"
when: aodh_get_venv | changed
when: aodh_get_venv is changed
notify: Restart aodh services
- name: Install pip packages
@ -83,7 +83,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: aodh_get_venv | failed or aodh_get_venv | skipped
@ -95,7 +95,7 @@
state: "absent"
when:
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
- aodh_get_venv | changed
- aodh_get_venv is changed
# NOTE(odyssey4me):
# We reinitialize the venv to ensure that the right
@ -113,7 +113,7 @@
--no-pip \
--no-setuptools \
--no-wheel
when: aodh_get_venv | changed
when: aodh_get_venv is changed
tags:
- skip_ansible_lint

View File

@ -25,7 +25,7 @@
description: "{{ aodh_service_description }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service
until: add_service|success
until: add_service is success
retries: 5
delay: 2
no_log: True
@ -44,7 +44,7 @@
insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service
when: not aodh_service_in_ldap | bool
until: add_service|success
until: add_service is success
retries: 5
delay: 10
no_log: True
@ -62,7 +62,7 @@
insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_admin_role
when: not aodh_service_in_ldap | bool
until: add_admin_role|success
until: add_admin_role is success
retries: 5
delay: 10
no_log: True
@ -87,7 +87,7 @@
- url: "{{ aodh_service_internalurl }}"
interface: "internal"
register: add_service
until: add_service|success
until: add_service is success
retries: 5
delay: 10
no_log: True