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: Iee01cc384368c76cf191244f4988ef735ee3d5d7
This commit is contained in:
parent
4b46ce34a7
commit
402c012b9f
|
@ -16,7 +16,7 @@
|
||||||
url: "{{ monasca_service_internalurl }}"
|
url: "{{ monasca_service_internalurl }}"
|
||||||
status_code: 401
|
status_code: 401
|
||||||
register: result
|
register: result
|
||||||
until: result|success
|
until: result is success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,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
|
||||||
|
|
||||||
|
@ -56,21 +56,21 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ monasca_bin | dirname }}"
|
path: "{{ monasca_bin | dirname }}"
|
||||||
state: absent
|
state: absent
|
||||||
when: monasca_get_venv | changed
|
when: monasca_get_venv is changed
|
||||||
|
|
||||||
- name: Create monasca venv dir
|
- name: Create monasca venv dir
|
||||||
file:
|
file:
|
||||||
path: "{{ monasca_bin | dirname }}"
|
path: "{{ monasca_bin | dirname }}"
|
||||||
state: directory
|
state: directory
|
||||||
register: monasca_venv_dir
|
register: monasca_venv_dir
|
||||||
when: monasca_get_venv | changed
|
when: monasca_get_venv is changed
|
||||||
|
|
||||||
- name: Unarchive pre-built venv
|
- name: Unarchive pre-built venv
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "/var/cache/{{ monasca_venv_download_url | basename }}"
|
src: "/var/cache/{{ monasca_venv_download_url | basename }}"
|
||||||
dest: "{{ monasca_bin | dirname }}"
|
dest: "{{ monasca_bin | dirname }}"
|
||||||
copy: "no"
|
copy: "no"
|
||||||
when: monasca_get_venv | changed
|
when: monasca_get_venv is changed
|
||||||
notify:
|
notify:
|
||||||
- Restart monasca services
|
- Restart monasca services
|
||||||
|
|
||||||
|
@ -85,7 +85,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: monasca_get_venv | failed or monasca_get_venv | skipped
|
when: monasca_get_venv | failed or monasca_get_venv | skipped
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
state: "absent"
|
state: "absent"
|
||||||
when:
|
when:
|
||||||
- ansible_pkg_mgr == 'yum'
|
- ansible_pkg_mgr == 'yum'
|
||||||
- monasca_get_venv | changed
|
- monasca_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
|
||||||
|
@ -116,6 +116,6 @@
|
||||||
--no-pip \
|
--no-pip \
|
||||||
--no-setuptools \
|
--no-setuptools \
|
||||||
--no-wheel
|
--no-wheel
|
||||||
when: monasca_get_venv | changed
|
when: monasca_get_venv is changed
|
||||||
tags:
|
tags:
|
||||||
- skip_ansible_lint
|
- skip_ansible_lint
|
||||||
|
|
|
@ -30,4 +30,4 @@
|
||||||
command: "/opt/kafka/bin/kafka-topics.sh --create --zookeeper {{ zookeeper_hosts }} --replication-factor {{ item.value.replicas }} --partitions {{ item.value.partitions }} --topic {{ item.key }}"
|
command: "/opt/kafka/bin/kafka-topics.sh --create --zookeeper {{ zookeeper_hosts }} --replication-factor {{ item.value.replicas }} --partitions {{ item.value.partitions }} --topic {{ item.key }}"
|
||||||
with_dict: "{{ kafka_topics }}"
|
with_dict: "{{ kafka_topics }}"
|
||||||
when:
|
when:
|
||||||
- check_result | failed
|
- check_result is failed
|
||||||
|
|
|
@ -21,7 +21,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
|
||||||
with_items:
|
with_items:
|
||||||
|
|
Loading…
Reference in New Issue