Minor changes

This commit is contained in:
Loïc Guégan 2023-10-27 13:24:14 +02:00
parent a65e22fc31
commit 0e179bf6ce

View file

@ -94,8 +94,7 @@ def exec(command):
for ip in get_node_list():
print("----- Node {} -----".format(ip))
if len(key_path)>0:
# subprocess.run(["ssh","-o", "StrictHostKeyChecking=no", "-i", CONF["ssh_key_path"],"{}@{}".format(user,ip), " ".join(command)])
print(["ssh","-o", "StrictHostKeyChecking=no", "-i", CONF["ssh_key_path"],"{}@{}".format(user,ip), " ".join(command)])
subprocess.run(["ssh","-o", "StrictHostKeyChecking=no", "-i", CONF["ssh"]["key_path"],"{}@{}".format(user,ip), " ".join(command)])
else:
# subprocess.run(["ssh","-o", "StrictHostKeyChecking=no", "{}@{}".format(user,ip), " ".join(command)])
print(["ssh","-o", "StrictHostKeyChecking=no", "{}@{}".format(user,ip), " ".join(command)])
subprocess.run(["ssh","-o", "StrictHostKeyChecking=no", "{}@{}".format(user,ip), " ".join(command)])