[~] minor

This commit is contained in:
2024-07-18 17:09:15 +03:00
parent d83bf97508
commit b560ed0ae6

View File

@@ -306,7 +306,7 @@ class VMKer:
time.sleep(0.99)
t += 1
if t > timeout:
return logger.error("No IPv4 address found.")
return logger.error(f"[{_name}] No IPv4 address found.")
logger.info(f"[{_name}] IPv4: {', '.join(ipv4)}")
logger.info(f"[{_name}] IPv6: {', '.join(ipv6)}")
@@ -325,7 +325,7 @@ class VMKer:
# TODO: length
_pwd = ''.join(random.choice(chars) for _ in range(12))
ssh.send_command(f"echo '{user}:{_pwd}' | chpasswd")
logger.info(f"Password for root: {_pwd}")
logger.info(f"[{_name}] Password for root: {_pwd}")
ssh.send_command(f'echo {_name} > /etc/hostname')
# TODO: yml