-
Notifications
You must be signed in to change notification settings - Fork 3
/
get_ceph_version.yml
52 lines (46 loc) · 1.43 KB
/
get_ceph_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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
- name: Get Ceph version
hosts: "{{ test.monitor.nodes }}"
tasks:
- name: register Ceph version
shell: "{{ test.ceph.reg.provider }} exec ceph-mon-`hostname -s` ceph --cluster {{ test.cluster.name }} --version | awk '{ print$3 }'"
become: true
register: ceph_version
run_once: yes
tags:
- sanity
- containerized
- name: print Ceph version
debug:
msg: "Build mark: ceph_version={{ceph_version.stdout}}"
- name: log Ceph version
lineinfile:
path: "{{ test.output.file }}"
line: "ceph_version={{ceph_version.stdout}}"
delegate_to: undercloud-0
run_once: yes
tags:
- sanity
- containerized
- name: Get Ceph-Ansible version
hosts: undercloud-0
tasks:
- name: get packages from undercloud
package_facts:
manager: "auto"
- name: print the package facts
debug:
var: ansible_facts.packages
- name: print Ceph-Ansible rpm version
debug:
msg: "Build mark: ceph_ansible_version={{ ansible_facts.packages['ceph-ansible'].0.version }}"
when: "'ceph-ansible' in ansible_facts.packages"
- name: log Ceph-Ansible version
lineinfile:
path: "{{ test.output.file }}"
line: "ceph_ansible_version={{ ansible_facts.packages['ceph-ansible'].0.version }}"
delegate_to: undercloud-0
run_once: yes
tags:
- sanity
- containerized