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: I595862a7cbee4c10ea0744055391754536b7f312
This commit is contained in:
Jean-Philippe Evrard 2018-07-12 16:44:20 +02:00
parent fb25c3d01e
commit f3ba0f0be6
5 changed files with 14 additions and 14 deletions

View File

@ -20,7 +20,7 @@
update_cache: yes
cache_valid_time: "{{ cache_timeout }}"
register: install_packages
until: install_packages|success
until: install_packages is success
retries: 5
delay: 2
with_items: "{{ watcher_distro_packages }}"
@ -30,7 +30,7 @@
pkg: "{{ item }}"
state: "{{ watcher_package_state }}"
register: install_packages
until: install_packages|success
until: install_packages is success
retries: 5
delay: 2
with_items: "{{ watcher_developer_mode_distro_packages }}"

View File

@ -51,6 +51,6 @@
- name: Reload the systemd daemon
systemd:
daemon_reload: "yes"
when: systemd_init | changed
when: systemd_init is changed
notify:
- Restart watcher services

View File

@ -26,7 +26,7 @@
- name: Reload init scripts
command: initctl reload-configuration
when: upstart_init | changed
when: upstart_init is changed
notify:
- Restart watcher services

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
@ -59,21 +59,21 @@
file:
path: "{{ watcher_bin | dirname }}"
state: absent
when: watcher_get_venv | changed
when: watcher_get_venv is changed
- name: Create watcher venv dir
file:
path: "{{ watcher_bin | dirname }}"
state: directory
register: watcher_venv_dir
when: watcher_get_venv | changed
when: watcher_get_venv is changed
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ watcher_venv_download_url | basename }}"
dest: "{{ watcher_bin | dirname }}"
copy: "no"
when: watcher_get_venv | changed
when: watcher_get_venv is changed
notify: Restart watcher services
- name: Install pip packages
@ -87,7 +87,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: watcher_get_venv | failed or watcher_get_venv | skipped
@ -109,6 +109,6 @@
--no-pip \
--no-setuptools \
--no-wheel
when: watcher_get_venv | changed
when: watcher_get_venv is changed
tags:
- skip_ansible_lint

View File

@ -25,7 +25,7 @@
description: "{{ watcher_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 watcher_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 watcher_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: "{{ watcher_service_internalurl }}"
interface: "internal"
register: add_service
until: add_service|success
until: add_service is success
retries: 5
delay: 10
no_log: true