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: Ie83262629060866dd0d208ed41704aef21416aa0
This commit is contained in:
Jean-Philippe Evrard 2018-07-12 16:44:20 +02:00
parent 3bd96fecbf
commit 1a3a0fdbf5
8 changed files with 17 additions and 17 deletions

View File

@ -21,7 +21,7 @@
daemon_reload: yes
with_items: "{{ filtered_neutron_services }}"
register: _stop
until: _stop | success
until: _stop is success
retries: 5
delay: 2
listen: "Restart neutron services"
@ -82,7 +82,7 @@
daemon_reload: yes
with_items: "{{ filtered_neutron_services }}"
register: _start
until: _start | success
until: _start is success
retries: 5
delay: 2
listen: "Restart neutron services"

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
@ -41,7 +41,7 @@
name: "{{ item }}"
state: absent
register: remove_packages
until: remove_packages|success
until: remove_packages is success
retries: 5
delay: 2
with_items: "{{ neutron_remove_distro_packages }}"

View File

@ -41,21 +41,21 @@
file:
path: "{{ neutron_bin | dirname }}"
state: absent
when: neutron_get_venv | changed
when: neutron_get_venv is changed
- name: Create neutron venv dir
file:
path: "{{ neutron_bin | dirname }}"
state: directory
register: neutron_venv_dir
when: neutron_get_venv | changed
when: neutron_get_venv is changed
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ neutron_venv_download_url | basename }}"
dest: "{{ neutron_bin | dirname }}"
copy: "no"
when: neutron_get_venv | changed
when: neutron_get_venv is changed
notify: Restart neutron services
- name: Install pip packages
@ -69,7 +69,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: neutron_get_venv | failed or neutron_get_venv | skipped
@ -81,7 +81,7 @@
state: "absent"
when:
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
- neutron_get_venv | changed
- neutron_get_venv is changed
# NOTE(odyssey4me):
# We reinitialize the venv to ensure that the right
@ -99,7 +99,7 @@
--no-pip \
--no-setuptools \
--no-wheel
when: neutron_get_venv | changed
when: neutron_get_venv is changed
tags:
- skip_ansible_lint
@ -124,7 +124,7 @@
neutron_lbaasv2 | bool or
neutron_vpnaas | bool
register: install_optional_packages
until: install_optional_packages | success
until: install_optional_packages is success
retries: 5
delay: 2
notify: Restart neutron services

View File

@ -72,4 +72,4 @@
- name: Apply updated SELinux contexts on neutron log directory
command: "restorecon -Rv {{ (neutron_log_dir_check.stat.islnk) | ternary(neutron_log_dir_check.stat.lnk_target, neutron_log_dir) }}"
when:
- selinux_file_context_log_files | changed
- selinux_file_context_log_files is changed

View File

@ -24,7 +24,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:
@ -44,7 +44,7 @@
validate_certs: "{{ calico_felix_validate_certs }}"
mode: '0755'
register: install_packages
until: install_packages|success
until: install_packages is success
retries: 5
delay: 2
when:

View File

@ -24,7 +24,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
notify: Restart neutron services

View File

@ -33,7 +33,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
tags:

View File

@ -37,7 +37,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