Compare commits

...

2 Commits

Author SHA1 Message Date
ce2e51bf06 add shutdown.yaml 2024-08-29 15:26:24 +08:00
b6ccbcde2c add servers 2024-08-29 15:26:15 +08:00
3 changed files with 16 additions and 0 deletions

6
es.ini Normal file
View File

@@ -0,0 +1,6 @@
[waykey]
192.168.1.34
192.168.1.36
192.168.1.37
192.168.1.47
192.168.1.49

View File

@@ -16,6 +16,7 @@
192.168.1.42
192.168.1.43
192.168.1.44
192.168.1.45
192.168.1.47
192.168.1.48
192.168.1.49

9
shutdown.yaml Normal file
View File

@@ -0,0 +1,9 @@
- name: Shutdown remote servers
hosts: all # 或者指定特定的主机组
become: yes # 提升权限为root用户
tasks:
- name: Shutdown the server
command: /sbin/shutdown -h now
async: 1
poll: 0
ignore_errors: true # 忽略错误以防止连接中断后任务失败