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: I75025f77746c0408553e1a33719134cf6d33507a
This commit is contained in:
Jean-Philippe Evrard 2018-07-12 16:44:21 +02:00
parent 4613c2d070
commit 9186a6063a
9 changed files with 18 additions and 18 deletions

View File

@ -30,7 +30,7 @@
insecure: "{{ keystone_service_adminuri_insecure }}" insecure: "{{ keystone_service_adminuri_insecure }}"
run_once: true run_once: true
register: add_service register: add_service
until: add_service|success until: add_service is success
retries: 5 retries: 5
delay: 2 delay: 2
no_log: True no_log: True
@ -52,7 +52,7 @@
insecure: "{{ keystone_service_adminuri_insecure }}" insecure: "{{ keystone_service_adminuri_insecure }}"
run_once: true run_once: true
register: add_user register: add_user
until: add_user|success until: add_user is success
retries: 5 retries: 5
delay: 10 delay: 10
no_log: True no_log: True
@ -73,7 +73,7 @@
insecure: "{{ keystone_service_adminuri_insecure }}" insecure: "{{ keystone_service_adminuri_insecure }}"
run_once: true run_once: true
register: add_admin_role register: add_admin_role
until: add_admin_role|success until: add_admin_role is success
retries: 5 retries: 5
delay: 10 delay: 10
no_log: True no_log: True
@ -92,7 +92,7 @@
insecure: "{{ keystone_service_adminuri_insecure }}" insecure: "{{ keystone_service_adminuri_insecure }}"
run_once: true run_once: true
register: add_swiftoperator_role register: add_swiftoperator_role
until: add_swiftoperator_role|success until: add_swiftoperator_role is success
retries: 5 retries: 5
delay: 10 delay: 10
no_log: True no_log: True
@ -120,7 +120,7 @@
interface: "internal" interface: "internal"
run_once: true run_once: true
register: add_endpoint register: add_endpoint
until: add_endpoint|success until: add_endpoint is success
retries: 5 retries: 5
delay: 10 delay: 10
no_log: True no_log: True

View File

@ -87,7 +87,7 @@
changed_when: false changed_when: false
delegate_to: "{{ physical_host }}" delegate_to: "{{ physical_host }}"
register: _lxc_container_state register: _lxc_container_state
until: _lxc_container_state | success until: _lxc_container_state is success
retries: 3 retries: 3
delay: 5 delay: 5
when: when:
@ -105,7 +105,7 @@
--logpriority {{ (debug | bool) | ternary('DEBUG', 'INFO') }} --logpriority {{ (debug | bool) | ternary('DEBUG', 'INFO') }}
delegate_to: "{{ physical_host }}" delegate_to: "{{ physical_host }}"
register: container_stop register: container_stop
until: container_stop | success until: container_stop is success
retries: 3 retries: 3
failed_when: failed_when:
- container_stop.rc not in [0, 2] - container_stop.rc not in [0, 2]
@ -126,7 +126,7 @@
--logpriority {{ (debug | bool) | ternary('DEBUG', 'INFO') }} --logpriority {{ (debug | bool) | ternary('DEBUG', 'INFO') }}
delegate_to: "{{ physical_host }}" delegate_to: "{{ physical_host }}"
register: container_start register: container_start
until: container_start | success until: container_start is success
retries: 3 retries: 3
when: when:
- (_mc is defined and _mc | changed) or (_ec is defined and _ec | changed) - (_mc is defined and _mc | changed) or (_ec is defined and _ec | changed)

View File

@ -109,12 +109,12 @@
name: "systemd-nspawn@{{ systemd_escape.stdout }}" name: "systemd-nspawn@{{ systemd_escape.stdout }}"
state: restarted state: restarted
register: _container_restart register: _container_restart
until: _container_restart | success until: _container_restart is success
retries: 3 retries: 3
delay: 5 delay: 5
delegate_to: "{{ physical_host }}" delegate_to: "{{ physical_host }}"
when: when:
- _ec | changed - _ec is changed
tags: tags:
- common-nspawn - common-nspawn
@ -123,6 +123,6 @@
delay: 3 delay: 3
timeout: 60 timeout: 60
when: when:
- _container_restart | changed - _container_restart is changed
tags: tags:
- common-nspawn - common-nspawn

View File

@ -215,4 +215,4 @@
option: need_online_data_migrations option: need_online_data_migrations
value: False value: False
when: when:
- data_migrations | succeeded - data_migrations is succeeded

View File

@ -205,4 +205,4 @@
option: need_online_data_migrations option: need_online_data_migrations
value: False value: False
when: when:
- data_migrations | succeeded - data_migrations is succeeded

View File

@ -73,7 +73,7 @@
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
{{ pip_install_options | default('') }} {{ pip_install_options | default('') }}
register: install_packages register: install_packages
until: install_packages|success until: install_packages is success
retries: 5 retries: 5
delay: 2 delay: 2

View File

@ -73,7 +73,7 @@
map(attribute='item') | list) map(attribute='item') | list)
| default(required_roles, True) }}" | default(required_roles, True) }}"
register: git_clone register: git_clone
until: git_clone | success until: git_clone is success
retries: "{{ git_clone_retries }}" retries: "{{ git_clone_retries }}"
delay: "{{ git_clone_retry_delay }}" delay: "{{ git_clone_retry_delay }}"

View File

@ -24,7 +24,7 @@
- name: Format the swap file - name: Format the swap file
command: mkswap /openstack/swap.img command: mkswap /openstack/swap.img
when: when:
- swap_create | changed - swap_create is changed
tags: tags:
- swap-format - swap-format
- skip_ansible_lint - skip_ansible_lint

View File

@ -20,7 +20,7 @@
state: "present" state: "present"
update_cache: yes update_cache: yes
register: install_packages register: install_packages
until: install_packages|success until: install_packages is success
retries: 5 retries: 5
delay: 2 delay: 2
with_items: with_items:
@ -42,7 +42,7 @@
state: "present" state: "present"
extra_args: "-c {{ pip_install_upper_constraints_proto }}://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?id={{ requirements_git_install_branch | regex_replace(' #.*$','') }}" extra_args: "-c {{ pip_install_upper_constraints_proto }}://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?id={{ requirements_git_install_branch | regex_replace(' #.*$','') }}"
register: install_packages register: install_packages
until: install_packages|success until: install_packages is success
retries: 5 retries: 5
delay: 2 delay: 2
with_items: with_items: