From 9cca3a5d17ca911fa110547831fbb3809b356717 Mon Sep 17 00:00:00 2001 From: Sebastian Kornehl Date: Tue, 19 May 2015 15:05:31 +0200 Subject: [PATCH] Added eval for pasting tag lists --- lib/ansible/modules/extras/monitoring/datadog_event.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/monitoring/datadog_event.py b/lib/ansible/modules/extras/monitoring/datadog_event.py index 1d6a98dc9c3..a3ac92a03bb 100644 --- a/lib/ansible/modules/extras/monitoring/datadog_event.py +++ b/lib/ansible/modules/extras/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: