From 47eab562802985757835f2a7d804b4a12945fe6a 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 --- lib/ansible/modules/extras/monitoring/zabbix_host.py | 8 ++++---- lib/ansible/modules/extras/monitoring/zabbix_hostmacro.py | 6 +++--- lib/ansible/modules/extras/monitoring/zabbix_screen.py | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/ansible/modules/extras/monitoring/zabbix_host.py b/lib/ansible/modules/extras/monitoring/zabbix_host.py index e69d3019178..d3b543f6641 100644 --- a/lib/ansible/modules/extras/monitoring/zabbix_host.py +++ b/lib/ansible/modules/extras/monitoring/zabbix_host.py @@ -335,13 +335,13 @@ def main(): argument_spec=dict( server_url=dict(required=True, default=None, 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/lib/ansible/modules/extras/monitoring/zabbix_hostmacro.py b/lib/ansible/modules/extras/monitoring/zabbix_hostmacro.py index c0661424dcd..fa673d879fc 100644 --- a/lib/ansible/modules/extras/monitoring/zabbix_hostmacro.py +++ b/lib/ansible/modules/extras/monitoring/zabbix_hostmacro.py @@ -168,12 +168,12 @@ def main(): argument_spec=dict( server_url=dict(required=True, default=None, 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/lib/ansible/modules/extras/monitoring/zabbix_screen.py b/lib/ansible/modules/extras/monitoring/zabbix_screen.py index 9a01eeaf34d..64f53afa8fb 100644 --- a/lib/ansible/modules/extras/monitoring/zabbix_screen.py +++ b/lib/ansible/modules/extras/monitoring/zabbix_screen.py @@ -314,9 +314,9 @@ def main(): argument_spec=dict( server_url=dict(required=True, default=None, 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 )