-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathcheck-kolla-version.yml
27 lines (24 loc) · 1.1 KB
/
check-kolla-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
- name: Check Kolla-Ansible version
tags: kolla-version-check
hosts: localhost
gather_facts: false
tasks:
- name: Check version
when: stackhpc_enable_kolla_check
block:
- name: Get current Kolla-Ansible tag
ansible.builtin.command:
cmd: git describe --tags
chdir: "{{ lookup('ansible.builtin.env', 'KOLLA_SOURCE_PATH') }}"
register: kolla_ansible_current_version
- name: Check installed Kolla-Ansible version is the expected version
ansible.builtin.assert:
that: "stackhpc_kolla_ansible_source_version in kolla_ansible_current_version.stdout"
fail_msg: |
Kolla-Ansible must use the expected version before continuing.
Current Kolla-Ansible version: {{ kolla_ansible_current_version.stdout }}
Expected Kolla-Ansible version: {{ stackhpc_kolla_ansible_source_version }}
Upgrade Kolla-Ansible by running: kayobe control host upgrade
success_msg: |
Kolla-Ansible running at version: {{ kolla_ansible_current_version.stdout }}