mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-07 14:03:01 +07:00
Move reset script to Python
This commit is contained in:
parent
2e12cd8a29
commit
19ec331f1a
17
infra/scripts/reset.py
Executable file
17
infra/scripts/reset.py
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/python
|
||||
|
||||
import os
|
||||
|
||||
user = "root"
|
||||
|
||||
nodes = [
|
||||
"node0.homelab.local",
|
||||
"node1.homelab.local",
|
||||
"node2.homelab.local",
|
||||
"node3.homelab.local"
|
||||
]
|
||||
|
||||
|
||||
for node in nodes:
|
||||
print(f"ssh {user}@{node} poweroff")
|
||||
os.system(f"ssh {user}@{node} poweroff")
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
ssh root@node0.homelab.local 'efibootmgr --bootnext 0006 && poweroff'
|
||||
ssh root@node1.homelab.local 'efibootmgr --bootnext 0006 && poweroff'
|
||||
ssh root@node2.homelab.local 'efibootmgr --bootnext 0006 && poweroff'
|
||||
ssh root@node3.homelab.local 'efibootmgr --bootnext 0006 && poweroff'
|
Loading…
Reference in New Issue
Block a user