From b985c4d6a4fdb16e3a4918cdffb07424f80ad93b Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Tue, 26 May 2015 15:34:35 +0200 Subject: [PATCH] zabbix: improve module doc --- .../modules/extras/monitoring/zabbix_host.py | 16 ++++++++++------ .../extras/monitoring/zabbix_hostmacro.py | 7 +++++-- .../modules/extras/monitoring/zabbix_screen.py | 8 ++++---- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/lib/ansible/modules/extras/monitoring/zabbix_host.py b/lib/ansible/modules/extras/monitoring/zabbix_host.py index d3b543f6641..a9b8bf2c2a2 100644 --- a/lib/ansible/modules/extras/monitoring/zabbix_host.py +++ b/lib/ansible/modules/extras/monitoring/zabbix_host.py @@ -60,24 +60,28 @@ options: default: None status: description: - - 'Monitoring status of the host. Possible values are: "enabled" and "disabled".' + - 'Monitoring status of the host. required: false + choices: ['enabled', 'disabled'] default: "enabled" state: description: - - 'Possible values are: "present" and "absent". If the host already exists, and the state is "present", it will just to update the host is the associated data is different. "absent" will remove a host if it exists.' + - State of the host. + - On C(present), it will create if host does not exist or update the host if the associated data is different. + - On C(absent) will remove a host if it exists. required: false + choices: ['present', 'absent'] default: "present" timeout: description: - - The timeout of API request(seconds). + - The timeout of API request (seconds). default: 10 interfaces: description: - List of interfaces to be created for the host (see example below). - - Available values are: dns, ip, main, port, type and useip. - - Please review the interface documentation for more information on the supported properties: - - https://www.zabbix.com/documentation/2.0/manual/appendix/api/hostinterface/definitions#host_interface + - 'Available values are: dns, ip, main, port, type and useip.' + - Please review the interface documentation for more information on the supported properties + - 'https://www.zabbix.com/documentation/2.0/manual/appendix/api/hostinterface/definitions#host_interface' required: false default: [] ''' diff --git a/lib/ansible/modules/extras/monitoring/zabbix_hostmacro.py b/lib/ansible/modules/extras/monitoring/zabbix_hostmacro.py index fa673d879fc..8ab3e484eca 100644 --- a/lib/ansible/modules/extras/monitoring/zabbix_hostmacro.py +++ b/lib/ansible/modules/extras/monitoring/zabbix_hostmacro.py @@ -58,12 +58,15 @@ options: required: true state: description: - - 'Possible values are: "present" and "absent". If the macro already exists, and the state is "present", it will just to update the macro if needed.' + - State of the macro. + - On C(present), it will create if macro does not exist or update the macro if the associated data is different. + - On C(absent) will remove a macro if it exists. required: false + choices: ['present', 'absent'] default: "present" timeout: description: - - The timeout of API request(seconds). + - The timeout of API request (seconds). default: 10 ''' diff --git a/lib/ansible/modules/extras/monitoring/zabbix_screen.py b/lib/ansible/modules/extras/monitoring/zabbix_screen.py index 64f53afa8fb..8884a075e2f 100644 --- a/lib/ansible/modules/extras/monitoring/zabbix_screen.py +++ b/lib/ansible/modules/extras/monitoring/zabbix_screen.py @@ -47,15 +47,15 @@ options: required: true timeout: description: - - The timeout of API request(seconds). + - The timeout of API request (seconds). default: 10 zabbix_screens: description: - List of screens to be created/updated/deleted(see example). - If the screen(s) already been added, the screen(s) name won't be updated. - - When creating or updating screen(s), the screen_name, host_group are required. - - When deleting screen(s), the screen_name is required. - - 'The available states are: present(default) and absent. If the screen(s) already exists, and the state is not "absent", the screen(s) will just be updated as needed.' + - When creating or updating screen(s), C(screen_name), C(host_group) are required. + - When deleting screen(s), the C(screen_name) is required. + - 'The available states are: C(present) (default) and C(absent). If the screen(s) already exists, and the state is not C(absent), the screen(s) will just be updated as needed.' required: true notes: - Too many concurrent updates to the same screen may cause Zabbix to return errors, see examples for a workaround if needed.