From 37ed756d66a71c76657e945cbada9f4f0510d4b7 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Thu, 23 Jul 2015 15:26:09 -0400 Subject: [PATCH] Make sure role names are strings Fixes #10497 --- lib/ansible/playbook/role/definition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/playbook/role/definition.py b/lib/ansible/playbook/role/definition.py index 940c1736c96..d8dbb464daf 100644 --- a/lib/ansible/playbook/role/definition.py +++ b/lib/ansible/playbook/role/definition.py @@ -109,7 +109,7 @@ class RoleDefinition(Base, Become, Conditional, Taggable): return ds role_name = ds.get('role', ds.get('name')) - if not role_name: + if not role_name or not isinstance(role_name, string_types): raise AnsibleError('role definitions must contain a role name', obj=ds) return role_name