refactor: proxmox.logout earlier
This commit is contained in:
parent
39ce3ab65e
commit
30b15202ba
2
main.py
2
main.py
@ -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': {
|
||||
|
Loading…
Reference in New Issue
Block a user