refactor: proxmox.logout earlier

This commit is contained in:
Александр Степченко 2023-10-24 12:24:28 +03:00
parent 39ce3ab65e
commit 30b15202ba

View File

@ -99,6 +99,7 @@ def main():
vm_ip_master = get_vm_ip(proxmox, node, vm_id_master)
vm_ip_worker1 = get_vm_ip(proxmox, node, vm_id_worker1)
vm_ip_worker2 = get_vm_ip(proxmox, node, vm_id_worker2)
proxmox.logout()
with open('run/vm_ids' ,'w') as ofile:
vm_ids = f'{vm_id_master}\t{vm_names["master"]}\n'
@ -114,7 +115,6 @@ def main():
logger.info(hosts)
ofile.write(hosts)
proxmox.logout()
inventory = {
'workers': {
'hosts': {