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: I45c41bd5c88aa93df156670476a5667e6a1a1a12
This commit is contained in:
Jean-Philippe Evrard 2018-07-12 16:44:21 +02:00
parent b335e3c672
commit 28070c979c
2 changed files with 10 additions and 10 deletions

View File

@ -21,7 +21,7 @@
state: "started"
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
register: _stop
until: _stop | success
until: _stop is success
retries: 5
delay: 2
listen: "Restart congress services"
@ -33,7 +33,7 @@
state: "started"
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
register: _start
until: _start | success
until: _start is success
retries: 5
delay: 2
listen: "Restart congress services"
@ -44,7 +44,7 @@
timeout: 25
delay: 10
register: _wait_check
until: _wait_check | success
until: _wait_check is success
retries: 5
listen: "Restart congress services"

View File

@ -21,7 +21,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
@ -53,21 +53,21 @@
file:
path: "{{ congress_bin | dirname }}"
state: absent
when: congress_get_venv | changed
when: congress_get_venv is changed
- name: Create congress venv dir
file:
path: "{{ congress_bin | dirname }}"
state: directory
register: congress_venv_dir
when: congress_get_venv | changed
when: congress_get_venv is changed
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ congress_venv_download_url | basename }}"
dest: "{{ congress_bin | dirname }}"
copy: "no"
when: congress_get_venv | changed
when: congress_get_venv is changed
notify:
- Restart congress services
@ -82,7 +82,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: congress_get_venv | failed or congress_get_venv | skipped
@ -95,7 +95,7 @@
state: "absent"
when:
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
- congress_get_venv | changed
- congress_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: congress_get_venv | changed
when: congress_get_venv is changed
- name: Record the venv tag deployed
ini_file: