summaryrefslogtreecommitdiff
path: root/monitoring/zabbix_hostmacro.py
diff options
context:
space:
mode:
authorEike Frost <ei@kefro.st>2016-02-28 19:18:39 +0000
committerEike Frost <ei@kefro.st>2016-02-28 19:35:17 +0000
commit47466242a335abfa2464a8601d6bb52cad1e10cb (patch)
tree6048f16f38bb5c20dc6eb6b72e9ba5766946578a /monitoring/zabbix_hostmacro.py
parent479f99678b267b9c42c9c76504b9c528400eaf70 (diff)
downloadansible-modules-extras-47466242a335abfa2464a8601d6bb52cad1e10cb.tar.gz
Add explicit argument_spec types to avoid misinterpretation and subsequent errors (i.e. getting an int instead of the expected str)
Diffstat (limited to 'monitoring/zabbix_hostmacro.py')
-rw-r--r--monitoring/zabbix_hostmacro.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/monitoring/zabbix_hostmacro.py b/monitoring/zabbix_hostmacro.py
index e8d65370..7895d885 100644
--- a/monitoring/zabbix_hostmacro.py
+++ b/monitoring/zabbix_hostmacro.py
@@ -171,12 +171,12 @@ class HostMacro(object):
def main():
module = AnsibleModule(
argument_spec=dict(
- server_url=dict(required=True, aliases=['url']),
- login_user=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),
+ server_url=dict(type='str', required=True, aliases=['url']),
+ login_user=dict(type='str', required=True),
+ login_password=dict(type='str', required=True, no_log=True),
+ host_name=dict(type='str', required=True),
+ macro_name=dict(type='str', required=True),
+ macro_value=dict(type='str', required=True),
state=dict(default="present", choices=['present', 'absent']),
timeout=dict(type='int', default=10)
),