summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ansible/playbook/play.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py
index 8e5b78cb55..06e5ffc6ef 100644
--- a/lib/ansible/playbook/play.py
+++ b/lib/ansible/playbook/play.py
@@ -213,7 +213,7 @@ class Play(object):
role_vars = {}
if type(orig_path) == dict:
# what, not a path?
- role_name = orig_path.get('role', None)
+ role_name = utils.role_yaml_parse(orig_path)["name"]
if role_name is None:
raise errors.AnsibleError("expected a role name in dictionary: %s" % orig_path)
role_vars = orig_path