|
|
|
@ -21,8 +21,8 @@ version_added: '2.10'
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- This module allows you to search for Zabbix user entries.
|
|
|
|
- This module allows you to search for Zabbix user entries.
|
|
|
|
requirements:
|
|
|
|
requirements:
|
|
|
|
- python >= 2.6
|
|
|
|
- "python >= 2.6"
|
|
|
|
- zabbix-api
|
|
|
|
- "zabbix-api >= 0.5.4"
|
|
|
|
options:
|
|
|
|
options:
|
|
|
|
alias:
|
|
|
|
alias:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
@ -89,6 +89,7 @@ zabbix_user:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import atexit
|
|
|
|
import traceback
|
|
|
|
import traceback
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
@ -160,6 +161,7 @@ def main():
|
|
|
|
zbx = ZabbixAPI(server_url, timeout=timeout, user=http_login_user, passwd=http_login_password,
|
|
|
|
zbx = ZabbixAPI(server_url, timeout=timeout, user=http_login_user, passwd=http_login_password,
|
|
|
|
validate_certs=validate_certs)
|
|
|
|
validate_certs=validate_certs)
|
|
|
|
zbx.login(login_user, login_password)
|
|
|
|
zbx.login(login_user, login_password)
|
|
|
|
|
|
|
|
atexit.register(zbx.logout)
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|
module.fail_json(msg="Failed to connect to Zabbix server: %s" % e)
|
|
|
|
module.fail_json(msg="Failed to connect to Zabbix server: %s" % e)
|
|
|
|
|
|
|
|
|
|
|
|
|