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: Id12b96c1973b3823f9b02e069522795a958fd319
This commit is contained in:
parent
e87e86a9a4
commit
6930b5a2cc
|
@ -18,7 +18,7 @@
|
|||
update_cache: "{{ (ansible_pkg_mgr == 'apt') | 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
|
||||
|
||||
|
@ -40,7 +40,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
|
||||
|
||||
|
@ -63,21 +63,21 @@
|
|||
file:
|
||||
path: "{{ monasca_agent_bin | dirname }}"
|
||||
state: absent
|
||||
when: monasca_agent_get_venv | changed
|
||||
when: monasca_agent_get_venv is changed
|
||||
|
||||
- name: Create monasca-agent venv dir
|
||||
file:
|
||||
path: "{{ monasca_agent_bin | dirname }}"
|
||||
state: directory
|
||||
register: monasca_agent_venv_dir
|
||||
when: monasca_agent_get_venv | changed
|
||||
when: monasca_agent_get_venv is changed
|
||||
|
||||
- name: Unarchive pre-built venv
|
||||
unarchive:
|
||||
src: "/var/cache/{{ monasca_agent_venv_download_url | basename }}"
|
||||
dest: "{{ monasca_agent_bin | dirname }}"
|
||||
copy: "no"
|
||||
when: monasca_agent_get_venv | changed
|
||||
when: monasca_agent_get_venv is changed
|
||||
notify:
|
||||
- Restart monasca-agent services
|
||||
|
||||
|
@ -92,7 +92,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: monasca_agent_get_venv | failed or monasca_agent_get_venv | skipped
|
||||
|
@ -105,7 +105,7 @@
|
|||
state: "absent"
|
||||
when:
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
- monasca_agent_get_venv | changed
|
||||
- monasca_agent_get_venv is changed
|
||||
|
||||
# NOTE(odyssey4me):
|
||||
# We reinitialize the venv to ensure that the right
|
||||
|
@ -123,6 +123,6 @@
|
|||
--no-pip \
|
||||
--no-setuptools \
|
||||
--no-wheel
|
||||
when: monasca_agent_get_venv | changed
|
||||
when: monasca_agent_get_venv is changed
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
|
|
Loading…
Reference in New Issue