Skip to content

Commit 89c6c5e

Browse files
authored
Merge pull request #1892 from stackhpc/version-check-further-bugfixes
Version check further bugfixes
2 parents bca07e8 + 1d80815 commit 89c6c5e

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

etc/kayobe/ansible/check-kayobe-version.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,26 @@
77
requirements_path: "{{ kayobe_config_path }}/../../requirements.txt"
88
tasks:
99
- name: Check version
10-
when: stackhpc_enable_kayobe_check
10+
when: stackhpc_enable_kayobe_check | bool
1111
check_mode: false
1212
block:
1313
- name: Get package info
1414
community.general.pip_package_info:
1515
register: packages
1616

17+
- name: Check if Kayobe is installed as editable
18+
ansible.builtin.assert:
19+
that: packages.packages.pip.kayobe[0].editable_project_location is not defined
20+
fail_msg: |
21+
You are using Kayobe as an editable install. Please recreate the
22+
Kayobe environment, or reinstall Kayobe by running:
23+
pip install --force-reinstall -r {{ requirements_path }}
24+
25+
If an editable install is actually required, you can skip this
26+
check by setting stackhpc_enable_kayobe_check to false.
27+
success_msg: |
28+
Kayobe is not installed as editable.
29+
1730
- name: Check if pip is version 24.0 or newer
1831
ansible.builtin.assert:
1932
that: "{{ packages.packages.pip.pip[0].version is version('24.0', '>=') }}"

etc/kayobe/ansible/check-kolla-ansible-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
gather_facts: false
66
tasks:
77
- name: Check version
8-
when: stackhpc_enable_kolla_ansible_check
8+
when: stackhpc_enable_kolla_ansible_check | bool
99
check_mode: false
1010
block:
1111
- name: Get current Kolla-Ansible tag

0 commit comments

Comments
 (0)