1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Added eval for pasting tag lists

This commit is contained in:
Sebastian Kornehl 2015-05-19 15:05:31 +02:00 committed by Matt Clay
parent 2cc53281d8
commit 9cca3a5d17

View file

@ -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: