Skip to content

Commit 035f54f

Browse files
committed
Update kayobe version check ordering
1 parent 6539cce commit 035f54f

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,17 @@
3434
state: directory
3535
register: kayobe_temp_dir
3636

37-
- name: Clone Kayobe
38-
ansible.builtin.git:
39-
repo: https://github.com/stackhpc/kayobe.git
40-
dest: "{{ kayobe_temp_dir.path }}/kayobe-git"
41-
version: stackhpc/{{ openstack_release }}
42-
4337
- name: Get expected Kayobe version
4438
ansible.builtin.shell:
4539
cmd: set -o pipefail && grep -o kayobe@.*$ {{ requirements_path }} | cut -d @ -f 3
4640
executable: /usr/bin/bash
4741
register: kayobe_expected_version
4842

49-
- name: Checkout expected Kayobe version
50-
ansible.builtin.command:
51-
cmd: git checkout {{ kayobe_expected_version.stdout }}
52-
chdir: "{{ kayobe_temp_dir.path }}/kayobe-git"
43+
- name: Clone Kayobe at the expected version
44+
ansible.builtin.git:
45+
repo: https://github.com/stackhpc/kayobe.git
46+
dest: "{{ kayobe_temp_dir.path }}/kayobe-git"
47+
version: "{{ kayobe_expected_version.stdout }}"
5348

5449
- name: Get tag from current Kayobe commit
5550
ansible.builtin.command:
@@ -68,7 +63,7 @@
6863
state: absent
6964
path: "{{ kayobe_temp_dir.path }}"
7065

71-
- name: Check installed Kayobe version is the latest
66+
- name: Check installed Kayobe version matches
7267
ansible.builtin.assert:
7368
that: kayobe_current_commit.stdout in kayobe_expected_commit.stdout
7469
fail_msg: |

0 commit comments

Comments
 (0)