Skip to content

Commit 88dba74

Browse files
Add pip 24 precheck
1 parent ceeacc3 commit 88dba74

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

+12
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
vars:
77
requirements_path: "{{ kayobe_config_path }}/../../requirements.txt"
88
tasks:
9+
- name: Get package info
10+
community.general.pip_package_info:
11+
register: packages
12+
13+
- name: Check if pip is version 24.0 or newer
14+
ansible.builtin.assert:
15+
that: "{{ packages.packages.pip.pip[0].version is version('24.0', '>=') }}"
16+
fail_msg: |
17+
Pip must be 24.0 or newer to run this check. Upgrade pip by running
18+
pip install -U pip and reinstall Kayobe by running:
19+
pip install --force-reinstall -r {{ requirements_path }}
20+
921
- name: Get installed Kayobe commit
1022
ansible.builtin.shell:
1123
cmd: set -o pipefail && pip freeze | grep kayobe | cut -d @ -f 3

0 commit comments

Comments
 (0)