added missing atexit logout for zabbix_host module

pull/63785/head
Dusan Matejka 5 years ago
parent e4b6dd1862
commit 59ed663113

@ -742,6 +742,7 @@ def main():
zbx = ZabbixAPI(server_url, timeout=timeout, user=http_login_user, passwd=http_login_password,
validate_certs=validate_certs)
zbx.login(login_user, login_password)
atexit.register(zbx.logout)
except Exception as e:
module.fail_json(msg="Failed to connect to Zabbix server: %s" % e)

Loading…
Cancel
Save