Forget nodes from know host

This commit is contained in:
Khue Doan 2020-11-13 00:25:17 +07:00
parent 5f09306593
commit f87a915c1c

View File

@ -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)