summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg DeKoenigsberg <greg.dekoenigsberg@gmail.com>2015-06-01 09:17:20 -0400
committerGreg DeKoenigsberg <greg.dekoenigsberg@gmail.com>2015-06-01 09:17:20 -0400
commit9f9b50996ede3ffdd0653e4b58df03db8b9ef2bb (patch)
treeca23b9396bc3e259f152968b4c123711219aa79e
parent82552bbca8913d9146c5a650ee10965979c4bb58 (diff)
parentfa2f250f14925b495d068110c66f9cad69b1450a (diff)
downloadansible-modules-extras-9f9b50996ede3ffdd0653e4b58df03db8b9ef2bb.tar.gz
Merge pull request #512 from skornehl/devel
Added eval for pasting tag lists
-rw-r--r--monitoring/datadog_event.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/monitoring/datadog_event.py b/monitoring/datadog_event.py
index 1d6a98dc..a3ac92a0 100644
--- a/monitoring/datadog_event.py
+++ b/monitoring/datadog_event.py
@@ -116,7 +116,10 @@ def post_event(module):
if module.params['date_happened'] != None:
body['date_happened'] = module.params['date_happened']
if module.params['tags'] != None:
- body['tags'] = module.params['tags'].split(",")
+ if module.params['tags'].startswith("[") and module.params['tags'].endswith("]"):
+ body['tags'] = eval(module.params['tags'])
+ else:
+ body['tags'] = module.params['tags'].split(",")
if module.params['aggregation_key'] != None:
body['aggregation_key'] = module.params['aggregation_key']
if module.params['source_type_name'] != None: