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: Id1763360f4d9c270c1d0b98d6ee4bb05920e6e74
This commit is contained in:
parent
93091a1196
commit
8b0a89d02a
@ -44,7 +44,7 @@
|
|||||||
update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
|
update_cache: "{{ (ansible_pkg_mgr == 'apt') | 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
|
||||||
|
|
||||||
@ -72,14 +72,14 @@
|
|||||||
register: horizon_get_venv
|
register: horizon_get_venv
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 5
|
delay: 5
|
||||||
until: horizon_get_venv | succeeded
|
until: horizon_get_venv is succeeded
|
||||||
when: horizon_venv_download | bool
|
when: horizon_venv_download | bool
|
||||||
|
|
||||||
- name: Remove existing venv
|
- name: Remove existing venv
|
||||||
file:
|
file:
|
||||||
path: "{{ horizon_bin | dirname }}"
|
path: "{{ horizon_bin | dirname }}"
|
||||||
state: absent
|
state: absent
|
||||||
when: horizon_get_venv | changed
|
when: horizon_get_venv is changed
|
||||||
|
|
||||||
- name: Create horizon venv dir
|
- name: Create horizon venv dir
|
||||||
file:
|
file:
|
||||||
@ -87,14 +87,14 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
register: horizon_venv_dir
|
register: horizon_venv_dir
|
||||||
when: horizon_get_venv | changed
|
when: horizon_get_venv is changed
|
||||||
|
|
||||||
- name: Unarchive pre-built venv
|
- name: Unarchive pre-built venv
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "/var/cache/{{ horizon_venv_download_url | basename }}"
|
src: "/var/cache/{{ horizon_venv_download_url | basename }}"
|
||||||
dest: "{{ horizon_bin | dirname }}"
|
dest: "{{ horizon_bin | dirname }}"
|
||||||
copy: "no"
|
copy: "no"
|
||||||
when: horizon_get_venv | changed
|
when: horizon_get_venv is changed
|
||||||
notify: Restart apache2
|
notify: Restart apache2
|
||||||
|
|
||||||
- name: Install pip packages
|
- name: Install pip packages
|
||||||
@ -108,7 +108,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: horizon_get_venv | failed or horizon_get_venv | skipped
|
when: horizon_get_venv | failed or horizon_get_venv | skipped
|
||||||
@ -125,7 +125,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: horizon_optional_pip_packages | length > 0
|
when: horizon_optional_pip_packages | length > 0
|
||||||
@ -136,7 +136,7 @@
|
|||||||
state: "absent"
|
state: "absent"
|
||||||
when:
|
when:
|
||||||
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
|
- ansible_pkg_mgr in ['yum', 'dnf', 'zypper']
|
||||||
- horizon_get_venv | changed
|
- horizon_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
|
||||||
@ -154,7 +154,7 @@
|
|||||||
--no-pip \
|
--no-pip \
|
||||||
--no-setuptools \
|
--no-setuptools \
|
||||||
--no-wheel
|
--no-wheel
|
||||||
when: horizon_get_venv | changed
|
when: horizon_get_venv is changed
|
||||||
tags:
|
tags:
|
||||||
- skip_ansible_lint
|
- skip_ansible_lint
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user