Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion etc/kayobe/ansible/check-kayobe-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,26 @@
requirements_path: "{{ kayobe_config_path }}/../../requirements.txt"
tasks:
- name: Check version
when: stackhpc_enable_kayobe_check
when: stackhpc_enable_kayobe_check | bool
check_mode: false
block:
- name: Get package info
community.general.pip_package_info:
register: packages

- name: Check if Kayobe is installed as editable
ansible.builtin.assert:
that: packages.packages.pip.kayobe[0].editable_project_location is not defined
fail_msg: |
You are using Kayobe as an editable install. Please recreate the
Kayobe environment, or reinstall Kayobe by running:
pip install --force-reinstall -r {{ requirements_path }}

If an editable install is actually required, you can skip this
check by setting stackhpc_enable_kayobe_check to false.
success_msg: |
Kayobe is not installed as editable.

- name: Check if pip is version 24.0 or newer
ansible.builtin.assert:
that: "{{ packages.packages.pip.pip[0].version is version('24.0', '>=') }}"
Expand Down Expand Up @@ -46,7 +59,7 @@
dest: "{{ kayobe_temp_dir.path }}/kayobe-git"
version: "{{ kayobe_expected_version.stdout }}"

- name: Get tag from current Kayobe commit

Check warning on line 62 in etc/kayobe/ansible/check-kayobe-version.yml

View workflow job for this annotation

GitHub Actions / Ansible 2.17 lint with Python 3.10

command-instead-of-module

git used in place of git module

Check warning on line 62 in etc/kayobe/ansible/check-kayobe-version.yml

View workflow job for this annotation

GitHub Actions / Ansible 2.18 lint with Python 3.12

command-instead-of-module

git used in place of git module
ansible.builtin.command:
cmd: git describe --tags {{ kayobe_current_commit.stdout }}
chdir: "{{ kayobe_temp_dir.path }}/kayobe-git"
Expand Down
2 changes: 1 addition & 1 deletion etc/kayobe/ansible/check-kolla-ansible-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
gather_facts: false
tasks:
- name: Check version
when: stackhpc_enable_kolla_ansible_check
when: stackhpc_enable_kolla_ansible_check | bool
check_mode: false
block:
- name: Get current Kolla-Ansible tag

Check warning on line 11 in etc/kayobe/ansible/check-kolla-ansible-version.yml

View workflow job for this annotation

GitHub Actions / Ansible 2.17 lint with Python 3.10

command-instead-of-module

git used in place of git module

Check warning on line 11 in etc/kayobe/ansible/check-kolla-ansible-version.yml

View workflow job for this annotation

GitHub Actions / Ansible 2.18 lint with Python 3.12

command-instead-of-module

git used in place of git module
ansible.builtin.command:
cmd: git describe --tags
chdir: "{{ lookup('ansible.builtin.env', 'KOLLA_SOURCE_PATH') }}"
Expand Down
Loading