-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathansible.log
More file actions
192 lines (160 loc) · 7.51 KB
/
ansible.log
File metadata and controls
192 lines (160 loc) · 7.51 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
🚀 开始系统巡检...
🗑️ 旧报告已清理
PLAY [Prepare report directory on controller] **********************************
TASK [删除旧报告目录(如果存在)] **********************************************
changed: [localhost]
TASK [创建报告目录] ************************************************************
changed: [localhost]
PLAY [Collect system info on all hosts and produce per-host report] ************
TASK [Gathering Facts] *********************************************************
ok: [192.168.27.217]
ok: [192.168.27.214]
ok: [192.168.27.213]
ok: [192.168.27.215]
ok: [192.168.27.212]
ok: [192.168.27.218]
TASK [安装基础巡检工具(尽量保证有 lscpu/free/sensors)] ***********************
ok: [192.168.27.214]
ok: [192.168.27.217]
ok: [192.168.27.213]
ok: [192.168.27.215]
ok: [192.168.27.212]
ok: [192.168.27.218]
TASK [收集 CPU 信息 (lscpu)] ***************************************************
changed: [192.168.27.217]
changed: [192.168.27.214]
changed: [192.168.27.213]
changed: [192.168.27.215]
changed: [192.168.27.212]
changed: [192.168.27.218]
TASK [收集 内存 信息 (free -h)] ************************************************
changed: [192.168.27.217]
changed: [192.168.27.214]
changed: [192.168.27.213]
changed: [192.168.27.215]
changed: [192.168.27.212]
changed: [192.168.27.218]
TASK [收集 磁盘 信息 (df -hT)] *************************************************
changed: [192.168.27.214]
changed: [192.168.27.217]
changed: [192.168.27.213]
changed: [192.168.27.215]
changed: [192.168.27.212]
changed: [192.168.27.218]
TASK [收集 温度 信息 (sensors) — 可能不存在] ***********************************
ok: [192.168.27.214]
ok: [192.168.27.213]
ok: [192.168.27.217]
ok: [192.168.27.215]
ok: [192.168.27.212]
ok: [192.168.27.218]
TASK [将单主机报告写入 /tmp/192.168.27.212_report.txt] *************************
changed: [192.168.27.217]
changed: [192.168.27.214]
changed: [192.168.27.213]
changed: [192.168.27.215]
changed: [192.168.27.212]
changed: [192.168.27.218]
TASK [将 /tmp/192.168.27.212_report.txt 拉回控制节点的 report 目录] ************
changed: [192.168.27.217]
changed: [192.168.27.213]
changed: [192.168.27.214]
changed: [192.168.27.215]
changed: [192.168.27.212]
changed: [192.168.27.218]
PLAY [Assemble all per-host reports into one file on controller] ***************
TASK [拼接成 /home/ansible/ansible/report/report.txt] **************************
changed: [localhost]
PLAY RECAP *********************************************************************
192.168.27.212 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
192.168.27.213 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
192.168.27.214 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
192.168.27.215 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
192.168.27.217 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
192.168.27.218 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
localhost : ok=3 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
✅ 巡检完成,报告生成在 /home/ansible/ansible/report/report.txt
📧 正在发送邮件到 1107649535@qq.com...
msmtp: cannot log to /home/ansible/ansible/msmtp.log: cannot open: Permission denied
msmtp: log info was: host=smtp.qq.com tls=on auth=on user=1107649535@qq.com from=1107649535@qq.com recipients=1107649535@qq.com mailsize=25925 smtpstatus=250 smtpmsg='250 OK: queued as.' exitcode=EX_OK
✅ 邮件已发送
🚀 开始系统巡检...
🗑️ 旧报告已清理
PLAY [Prepare report directory on controller] **********************************
TASK [删除旧报告目录(如果存在)] **********************************************
changed: [localhost]
TASK [创建报告目录] ************************************************************
changed: [localhost]
PLAY [Collect system info on all hosts and produce per-host report] ************
TASK [Gathering Facts] *********************************************************
ok: [192.168.27.214]
ok: [192.168.27.213]
ok: [192.168.27.215]
ok: [192.168.27.217]
ok: [192.168.27.212]
ok: [192.168.27.218]
TASK [安装基础巡检工具(尽量保证有 lscpu/free/sensors)] ***********************
ok: [192.168.27.217]
ok: [192.168.27.214]
ok: [192.168.27.213]
ok: [192.168.27.215]
ok: [192.168.27.212]
ok: [192.168.27.218]
TASK [收集 CPU 信息 (lscpu)] ***************************************************
changed: [192.168.27.217]
changed: [192.168.27.214]
changed: [192.168.27.213]
changed: [192.168.27.212]
changed: [192.168.27.218]
changed: [192.168.27.215]
TASK [收集 内存 信息 (free -h)] ************************************************
changed: [192.168.27.217]
changed: [192.168.27.213]
changed: [192.168.27.214]
changed: [192.168.27.215]
changed: [192.168.27.212]
changed: [192.168.27.218]
TASK [收集 磁盘 信息 (df -hT)] *************************************************
changed: [192.168.27.214]
changed: [192.168.27.213]
changed: [192.168.27.217]
changed: [192.168.27.215]
changed: [192.168.27.218]
changed: [192.168.27.212]
TASK [收集 温度 信息 (sensors) — 可能不存在] ***********************************
ok: [192.168.27.214]
ok: [192.168.27.217]
ok: [192.168.27.213]
ok: [192.168.27.215]
ok: [192.168.27.212]
ok: [192.168.27.218]
TASK [将单主机报告写入 /tmp/192.168.27.212_report.txt] *************************
changed: [192.168.27.217]
changed: [192.168.27.214]
changed: [192.168.27.213]
changed: [192.168.27.215]
changed: [192.168.27.212]
changed: [192.168.27.218]
TASK [将 /tmp/192.168.27.212_report.txt 拉回控制节点的 report 目录] ************
changed: [192.168.27.217]
changed: [192.168.27.213]
changed: [192.168.27.214]
changed: [192.168.27.215]
changed: [192.168.27.212]
changed: [192.168.27.218]
PLAY [Assemble all per-host reports into one file on controller] ***************
TASK [拼接成 /home/ansible/ansible/report/report.txt] **************************
changed: [localhost]
PLAY RECAP *********************************************************************
192.168.27.212 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
192.168.27.213 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
192.168.27.214 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
192.168.27.215 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
192.168.27.217 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
192.168.27.218 : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
localhost : ok=3 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
✅ 巡检完成,报告生成在 /home/ansible/ansible/report/report.txt
📧 正在发送邮件到 1107649535@qq.com...
msmtp: cannot log to /home/ansible/ansible/msmtp.log: cannot open: Permission denied
msmtp: log info was: host=smtp.qq.com tls=on auth=on user=1107649535@qq.com from=1107649535@qq.com recipients=1107649535@qq.com mailsize=25925 smtpstatus=250 smtpmsg='250 OK: queued as.' exitcode=EX_OK
✅ 邮件已发送