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: If3e4366c22e900557e4730a7e8838f55ffe30ecc
This commit is contained in:
Jean-Philippe Evrard 2018-07-12 16:44:21 +02:00
parent 9b22c41c86
commit 9f53e04687
15 changed files with 33 additions and 33 deletions

View File

@ -28,7 +28,7 @@
daemon_reload: yes daemon_reload: yes
with_items: "{{ filtered_nova_services }}" with_items: "{{ filtered_nova_services }}"
register: _stop register: _stop
until: _stop | success until: _stop is success
retries: 5 retries: 5
delay: 2 delay: 2
listen: "Restart nova services" listen: "Restart nova services"
@ -59,7 +59,7 @@
daemon_reload: yes daemon_reload: yes
with_items: "{{ filtered_nova_services }}" with_items: "{{ filtered_nova_services }}"
register: _start register: _start
until: _start | success until: _start is success
retries: 5 retries: 5
delay: 2 delay: 2
listen: "Restart nova services" listen: "Restart nova services"

View File

@ -48,7 +48,7 @@
force: yes force: yes
accept_hostkey: yes accept_hostkey: yes
register: git_clone register: git_clone
until: git_clone|success until: git_clone is success
retries: 5 retries: 5
delay: 2 delay: 2
notify: notify:
@ -68,7 +68,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
when: when:

View File

@ -48,7 +48,7 @@
force: yes force: yes
accept_hostkey: yes accept_hostkey: yes
register: git_clone register: git_clone
until: git_clone|success until: git_clone is success
retries: 5 retries: 5
delay: 2 delay: 2
notify: notify:

View File

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

View File

@ -38,6 +38,6 @@
- name: Configure lxd init - name: Configure lxd init
command: "{{ nova_system_home_folder }}/lxd-init.sh" command: "{{ nova_system_home_folder }}/lxd-init.sh"
when: lxd_init_script | changed when: lxd_init_script is changed
tags: tags:
- nova-lxd - nova-lxd

View File

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

View File

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

View File

@ -112,7 +112,7 @@
value: False value: False
when: when:
- not data_migrations | skipped - not data_migrations | skipped
- data_migrations | succeeded - data_migrations is succeeded
- name: Create the cell1 mapping entry in the nova API DB - name: Create the cell1 mapping entry in the nova API DB
command: >- command: >-

View File

@ -39,7 +39,7 @@
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}" update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}" cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
register: install_packages register: install_packages
until: install_packages|success until: install_packages is success
retries: 5 retries: 5
delay: 2 delay: 2
tags: tags:

View File

@ -18,7 +18,7 @@
url: "{{ item.url }}" url: "{{ item.url }}"
state: "{{ item.state }}" state: "{{ item.state }}"
register: add_nv_keys register: add_nv_keys
until: add_nv_keys|success until: add_nv_keys is success
retries: 5 retries: 5
delay: 2 delay: 2
with_items: "{{ novalink_gpg_keys }}" with_items: "{{ novalink_gpg_keys }}"
@ -45,9 +45,9 @@
- name: Update Apt cache - name: Update Apt cache
apt: apt:
update_cache: yes update_cache: yes
when: add_nv_repos | changed when: add_nv_repos is changed
register: update_apt_cache register: update_apt_cache
until: update_apt_cache | success until: update_apt_cache is success
retries: 5 retries: 5
delay: 2 delay: 2
tags: tags:

View File

@ -34,7 +34,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
tags: tags:
@ -68,7 +68,7 @@
path: "{{ nova_bin | dirname }}" path: "{{ nova_bin | dirname }}"
state: absent state: absent
when: when:
- nova_get_venv | changed - nova_get_venv is changed
tags: tags:
- nova-pip-packages - nova-pip-packages
@ -78,7 +78,7 @@
state: directory state: directory
register: nova_venv_dir register: nova_venv_dir
when: when:
- nova_get_venv | changed - nova_get_venv is changed
tags: tags:
- nova-pip-packages - nova-pip-packages
@ -88,7 +88,7 @@
dest: "{{ nova_bin | dirname }}" dest: "{{ nova_bin | dirname }}"
copy: "no" copy: "no"
when: when:
- nova_get_venv | changed - nova_get_venv is changed
notify: notify:
- Manage LB - Manage LB
- Restart nova services - Restart nova services
@ -106,7 +106,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
when: when:
@ -123,7 +123,7 @@
state: "absent" state: "absent"
when: when:
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper'] - ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
- nova_get_venv | changed - nova_get_venv is changed
# NOTE(odyssey4me): # NOTE(odyssey4me):
# We reinitialize the venv to ensure that the right # We reinitialize the venv to ensure that the right
@ -142,7 +142,7 @@
--no-setuptools \ --no-setuptools \
--no-wheel --no-wheel
when: when:
- nova_get_venv | changed - nova_get_venv is changed
tags: tags:
- skip_ansible_lint - skip_ansible_lint
- nova-pip-packages - nova-pip-packages

View File

@ -41,7 +41,7 @@
- name: Apply updated SELinux contexts on /var/lib/nova - name: Apply updated SELinux contexts on /var/lib/nova
command: restorecon -R /var/lib/nova command: restorecon -R /var/lib/nova
when: when:
- selinux_equivalence | changed or selinux_file_context_ssh_keys | changed - selinux_equivalence | changed or selinux_file_context_ssh_keys is changed
- name: Stat nova's log directory - name: Stat nova's log directory
stat: stat:
@ -58,7 +58,7 @@
- name: Apply updated SELinux contexts on nova log directory - name: Apply updated SELinux contexts on nova log directory
command: "restorecon -Rv {{ (nova_log_dir_check.stat.islnk) | ternary(nova_log_dir_check.stat.lnk_target, nova_log_dir) }}" command: "restorecon -Rv {{ (nova_log_dir_check.stat.islnk) | ternary(nova_log_dir_check.stat.lnk_target, nova_log_dir) }}"
when: when:
- selinux_file_context_log_files | changed - selinux_file_context_log_files is changed
- name: Copy OSA SELinux policy - name: Copy OSA SELinux policy
copy: copy:

View File

@ -26,7 +26,7 @@
description: "{{ nova_service_description }}" description: "{{ nova_service_description }}"
insecure: "{{ keystone_service_adminuri_insecure }}" insecure: "{{ keystone_service_adminuri_insecure }}"
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
@ -50,7 +50,7 @@
register: add_service register: add_service
when: when:
- not nova_service_in_ldap | bool - not nova_service_in_ldap | bool
until: add_service|success until: add_service is success
retries: 5 retries: 5
delay: 10 delay: 10
no_log: True no_log: True
@ -74,7 +74,7 @@
register: add_service register: add_service
when: when:
- not nova_service_in_ldap | bool - not nova_service_in_ldap | bool
until: add_service|success until: add_service is success
retries: 5 retries: 5
delay: 10 delay: 10
no_log: True no_log: True
@ -103,7 +103,7 @@
- url: "{{ nova_service_adminurl }}" - url: "{{ nova_service_adminurl }}"
interface: "admin" interface: "admin"
register: add_service register: add_service
until: add_service|success until: add_service is success
retries: 5 retries: 5
delay: 10 delay: 10
no_log: True no_log: True
@ -125,7 +125,7 @@
description: "{{ nova_placement_service_description }}" description: "{{ nova_placement_service_description }}"
insecure: "{{ keystone_service_adminuri_insecure }}" insecure: "{{ keystone_service_adminuri_insecure }}"
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
@ -147,7 +147,7 @@
insecure: "{{ keystone_service_adminuri_insecure }}" insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service register: add_service
when: not nova_placement_service_in_ldap | bool when: not nova_placement_service_in_ldap | bool
until: add_service|success until: add_service is success
retries: 5 retries: 5
delay: 10 delay: 10
no_log: True no_log: True
@ -169,7 +169,7 @@
insecure: "{{ keystone_service_adminuri_insecure }}" insecure: "{{ keystone_service_adminuri_insecure }}"
register: add_service register: add_service
when: not nova_placement_service_in_ldap | bool when: not nova_placement_service_in_ldap | bool
until: add_service|success until: add_service is success
retries: 5 retries: 5
delay: 10 delay: 10
no_log: True no_log: True
@ -197,7 +197,7 @@
- url: "{{ nova_placement_service_adminurl }}" - url: "{{ nova_placement_service_adminurl }}"
interface: "admin" interface: "admin"
register: add_service register: add_service
until: add_service|success until: add_service is success
retries: 5 retries: 5
delay: 10 delay: 10
no_log: True no_log: True

View File

@ -52,5 +52,5 @@
service: service:
name: nginx name: nginx
state: restarted state: restarted
when: nginx_conf_removed | changed when: nginx_conf_removed is changed
failed_when: false failed_when: false

View File

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