-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_cluster.yml
More file actions
49 lines (37 loc) · 1.15 KB
/
Copy pathcheck_cluster.yml
File metadata and controls
49 lines (37 loc) · 1.15 KB
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
---
- name: check cluster all
command: "{{ grid_oracle_home }}/bin/crsctl check cluster -all"
register: check_cluster
changed_when: false
- set_fact:
nbr_crs_online: "{{ check_cluster.stdout_lines | select('match','^.*Cluster Ready Services is online') | list | count }}"
- set_fact:
nbr_css_online: "{{ check_cluster.stdout_lines | select('match','^.*Cluster Synchronization Services is online') | list | count }}"
- set_fact:
nbr_em_online: "{{ check_cluster.stdout_lines | select('match','^.*Event Manager is online') | list | count }}"
- debug:
var: nbr_crs_online
verbosity: 0
- debug:
var: nbr_css_online
verbosity: 2
- debug:
var: nbr_em_online
verbosity: 2
- set_fact:
check_crs_ok: False
- debug:
var: check_crs_ok
- set_fact:
check_crs_ok: True
when: nbr_crs_online == "{{ (nodes|length) }}"
and nbr_css_online == "{{ nodes|length }}"
and nbr_em_online == "{{ nodes|length }}"
- assert:
that:
- nbr_crs_online == "{{ nodes|length }}"
- nbr_css_online == "{{ nodes|length }}"
- nbr_em_online == "{{ nodes|length }}"
- assert:
that:
check_crs_ok == True