From 14bf6b016c07b65593a0a0d70a5ca83307fcf8ae Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Tue, 12 Jan 2016 08:14:21 -0500 Subject: [PATCH] Split up comma-separated tags properly Fixes #13795 --- lib/ansible/playbook/taggable.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ansible/playbook/taggable.py b/lib/ansible/playbook/taggable.py index 8f5cfa09344..54ca377d083 100644 --- a/lib/ansible/playbook/taggable.py +++ b/lib/ansible/playbook/taggable.py @@ -38,7 +38,11 @@ class Taggable: if isinstance(ds, list): return ds elif isinstance(ds, basestring): - return [ ds ] + 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)