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

Split up comma-separated tags properly

Fixes #13795
This commit is contained in:
James Cammarata 2016-01-12 08:14:21 -05:00
parent 4d3aa72143
commit b58673289a

View file

@ -38,6 +38,10 @@ class Taggable:
if isinstance(ds, list):
return ds
elif isinstance(ds, basestring):
value = ds.split(',')
if isinstance(value, list):
return [ x.strip() for x in value ]
else:
return [ ds ]
else:
raise AnsibleError('tags must be specified as a list', obj=ds)