mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-07 14:03:01 +07:00
Forget nodes from know host
This commit is contained in:
parent
5f09306593
commit
f87a915c1c
@ -49,12 +49,17 @@ def wake(node):
|
||||
print(f"Waking up {node['name']}")
|
||||
os.system(f"wol {node['mac']}")
|
||||
|
||||
def forget(node):
|
||||
os.system(f"ssh-keygen -R {node['ip']}")
|
||||
os.system(f"ssh-keygen -R {node['hostname']}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.chdir(f"./infra/pxe-server")
|
||||
os.system(f"docker-compose up -d --build")
|
||||
|
||||
for node in nodes:
|
||||
poweroff(node)
|
||||
forget(node)
|
||||
|
||||
time.sleep(10)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user