From 9d07fb9618c601c4f709950189914873e2a289d7 Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Tue, 26 May 2015 15:33:50 +0200 Subject: [PATCH] zabbix: improve arguments and prevent to log password --- monitoring/zabbix_host.py | 8 ++++---- monitoring/zabbix_hostmacro.py | 6 +++--- monitoring/zabbix_screen.py | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/monitoring/zabbix_host.py b/monitoring/zabbix_host.py index 7848ce78b53..5b1ee788d0b 100644 --- a/monitoring/zabbix_host.py +++ b/monitoring/zabbix_host.py @@ -338,13 +338,13 @@ def main(): argument_spec=dict( server_url=dict(required=True, aliases=['url']), login_user=dict(required=True), - login_password=dict(required=True), + login_password=dict(required=True, no_log=True), host_name=dict(required=True), host_groups=dict(required=False), link_templates=dict(required=False), - status=dict(default="enabled"), - state=dict(default="present"), - timeout=dict(default=10), + status=dict(default="enabled", choices=['enabled', 'disabled']), + state=dict(default="present", choices=['present', 'absent']), + timeout=dict(type='int', default=10), interfaces=dict(required=False) ), supports_check_mode=True diff --git a/monitoring/zabbix_hostmacro.py b/monitoring/zabbix_hostmacro.py index 873b33900f7..fc77df477e7 100644 --- a/monitoring/zabbix_hostmacro.py +++ b/monitoring/zabbix_hostmacro.py @@ -170,12 +170,12 @@ def main(): argument_spec=dict( server_url=dict(required=True, aliases=['url']), login_user=dict(required=True), - login_password=dict(required=True), + login_password=dict(required=True, no_log=True), host_name=dict(required=True), macro_name=dict(required=True), macro_value=dict(required=True), - state=dict(default="present"), - timeout=dict(default=10) + state=dict(default="present", choices=['present', 'absent']), + timeout=dict(type='int', default=10) ), supports_check_mode=True ) diff --git a/monitoring/zabbix_screen.py b/monitoring/zabbix_screen.py index 46029f9196a..408ab00c9ae 100644 --- a/monitoring/zabbix_screen.py +++ b/monitoring/zabbix_screen.py @@ -317,9 +317,9 @@ def main(): argument_spec=dict( server_url=dict(required=True, aliases=['url']), login_user=dict(required=True), - login_password=dict(required=True), - timeout=dict(default=10), - screens=dict(required=True) + login_password=dict(required=True, no_log=True), + timeout=dict(type='int', default=10), + screens=dict(type='dict', required=True) ), supports_check_mode=True )