diff --git a/lib/ansible/playbook/block.py b/lib/ansible/playbook/block.py index 1f52dfbf88..392b00b294 100644 --- a/lib/ansible/playbook/block.py +++ b/lib/ansible/playbook/block.py @@ -269,9 +269,6 @@ class Block(Base, Become, Conditional, Taggable): if self._parent_block is not None: if not self._parent_block.evaluate_conditional(templar, all_vars): return False - elif self._role is not None: - if not self._role.evaluate_conditional(templar, all_vars): - return False return super(Block, self).evaluate_conditional(templar, all_vars) def set_loader(self, loader): diff --git a/lib/ansible/playbook/role/__init__.py b/lib/ansible/playbook/role/__init__.py index 7523bdae9d..6793feb343 100644 --- a/lib/ansible/playbook/role/__init__.py +++ b/lib/ansible/playbook/role/__init__.py @@ -118,16 +118,6 @@ class Role(Base, Become, Conditional, Taggable): if role_include.role not in play.ROLE_CACHE: play.ROLE_CACHE[role_include.role] = dict() - if parent_role: - if parent_role.when: - new_when = parent_role.when[:] - new_when.extend(r.when or []) - r.when = new_when - if parent_role.tags: - new_tags = parent_role.tags[:] - new_tags.extend(r.tags or []) - r.tags = new_tags - play.ROLE_CACHE[role_include.role][hashed_params] = r return r