From a497a5a2a3050a4890ea81381fe96282349e6674 Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Fri, 22 May 2015 14:44:19 +0200 Subject: [PATCH] zabbix_group: add backword compatibility * add alias host_group for host_groups * add choices for param state --- lib/ansible/modules/extras/monitoring/zabbix_group.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/extras/monitoring/zabbix_group.py b/lib/ansible/modules/extras/monitoring/zabbix_group.py index 81fe3be5008..8fc88eb6bf5 100644 --- a/lib/ansible/modules/extras/monitoring/zabbix_group.py +++ b/lib/ansible/modules/extras/monitoring/zabbix_group.py @@ -55,6 +55,7 @@ options: - Possible values are: present and absent. required: false default: "present" + choices: [ "present", "absent" ] timeout: description: - The timeout of API request(seconds). @@ -63,6 +64,7 @@ options: description: - List of host groups to create or delete. required: true + aliases: [ "host_group" ] notes: - Too many concurrent updates to the same group may cause Zabbix to return errors, see examples for a workaround if needed. ''' @@ -152,8 +154,8 @@ def main(): server_url=dict(required=True, aliases=['url']), login_user=dict(required=True), login_password=dict(required=True), - host_groups=dict(required=True), - state=dict(default="present"), + host_groups=dict(required=True, aliases=['host_group']), + state=dict(default="present", choices=['present','absent']), timeout=dict(default=10) ), supports_check_mode=True @@ -206,4 +208,3 @@ def main(): from ansible.module_utils.basic import * main() -