From b5bf5258284188abf735591703e50ba84fa224bc Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Fri, 10 Feb 2017 08:26:01 -0600 Subject: [PATCH] Call parent super() in RoleDefinition init before doing other stuff This only impacts the use of RoleDefinition directly, but it was a tricky bug to spot. --- lib/ansible/playbook/role/definition.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/playbook/role/definition.py b/lib/ansible/playbook/role/definition.py index 32a1bdca58b..7fa8d0761ca 100644 --- a/lib/ansible/playbook/role/definition.py +++ b/lib/ansible/playbook/role/definition.py @@ -49,6 +49,9 @@ class RoleDefinition(Base, Become, Conditional, Taggable): _role = FieldAttribute(isa='string') def __init__(self, play=None, role_basedir=None, variable_manager=None, loader=None): + + super(RoleDefinition, self).__init__() + self._play = play self._variable_manager = variable_manager self._loader = loader @@ -56,7 +59,6 @@ class RoleDefinition(Base, Become, Conditional, Taggable): self._role_path = None self._role_basedir = role_basedir self._role_params = dict() - super(RoleDefinition, self).__init__() #def __repr__(self): # return 'ROLEDEF: ' + self._attributes.get('role', '')