-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathcluster-report.yaml
66 lines (60 loc) · 1.48 KB
/
cluster-report.yaml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
#
# Running Common System Checks On All Nodes
#
- hosts: nodes
tasks:
- import_tasks: tasks/common/check_node_services.yaml
- import_tasks: tasks/common/check_rpm_version.yaml
- import_tasks: tasks/common/check_load.yaml
#
# Get Cluster Info Using `oc` On First Master
# Change the index of masters[0] to run on different master
#
- hosts: masters[0]
tasks:
- import_tasks: tasks/cluster/get_nodes.yaml
- import_tasks: tasks/cluster/get_pods.yaml
- import_tasks: tasks/cluster/get_events.yaml
#
# Get ETCD Info, from all etcd nodes
#
- hosts: etcd
tasks:
- import_tasks: tasks/etcd/etcd_info.yaml
#
# Process Cluster Info Locally
#
- hosts: localhost
connection: local
tasks:
- import_tasks: tasks/local/dump_hostvars.yaml
- import_tasks: tasks/local/node_info.yaml
- import_tasks: tasks/local/node_resources.yaml
- import_tasks: tasks/local/pod_stats.yaml
- import_tasks: tasks/local/core_pods.yaml
#
# Generating the Final Report
# Output: Health_Check_Report_<date>.html
#
- hosts: localhost
connection: local
tasks:
- import_tasks: report/generate_report.yaml
#
# Email the report
#
- hosts: localhost
connection: local
vars:
email_report: False
email_from: [email protected] (OpenShift Cluster Overview)
email_recipients:
smtp_host: smtp.gmail.com
smtp_port: 587
smtp_user: [email protected]
smtp_pass: xxxxxx
tasks:
- import_tasks: report/email_report.yaml