|
20 | 20 | chdir: "{{ lookup('ansible.builtin.env', 'KOLLA_SOURCE_PATH') }}"
|
21 | 21 | register: kolla_ansible_current_branch
|
22 | 22 |
|
| 23 | + - name: Get current Kolla-Ansible commit |
| 24 | + ansible.builtin.command: |
| 25 | + cmd: git rev-parse HEAD |
| 26 | + chdir: "{{ lookup('ansible.builtin.env', 'KOLLA_SOURCE_PATH') }}" |
| 27 | + register: kolla_ansible_current_commit |
| 28 | + |
23 | 29 | - name: Check installed Kolla-Ansible version is the expected version
|
24 | 30 | ansible.builtin.assert:
|
25 | 31 | that: >
|
26 | 32 | stackhpc_kolla_ansible_source_version in kolla_ansible_current_tag.stdout or
|
27 |
| - stackhpc_kolla_ansible_source_version in kolla_ansible_current_branch.stdout |
| 33 | + stackhpc_kolla_ansible_source_version in kolla_ansible_current_branch.stdout or |
| 34 | + stackhpc_kolla_ansible_source_version in kolla_ansible_current_commit.stdout |
28 | 35 | fail_msg: |
|
29 | 36 | Kolla-Ansible must use the expected version before continuing. Either the
|
30 |
| - tag or the branch should match the expected version. |
| 37 | + tag, branch, or commit should match the expected version. |
31 | 38 |
|
32 | 39 | Current Kolla-Ansible tag: {{ kolla_ansible_current_tag.stdout }}
|
33 | 40 | Current Kolla-Ansible branch: {{ kolla_ansible_current_branch.stdout }}
|
| 41 | + Current Kolla-Ansible commit: {{ kolla_ansible_current_commit.stdout }} |
34 | 42 | Expected Kolla-Ansible version: {{ stackhpc_kolla_ansible_source_version }}
|
35 | 43 |
|
36 | 44 | Upgrade Kolla-Ansible by running: kayobe control host upgrade
|
37 | 45 | success_msg: |
|
38 |
| - Kolla-Ansible running at tag: {{ kolla_ansible_current_tag.stdout }} |
39 |
| - on branch: {{ kolla_ansible_current_branch.stdout }} |
| 46 | + Kolla-Ansible running at version: {{ stackhpc_kolla_ansible_source_version }} |
0 commit comments