From d07d974ad83d0e8f80c826ac254f0425c917562d Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Tue, 19 Jan 2016 18:17:42 -0500 Subject: [PATCH] Revert "Properly look for parent become attribute" This reverts commit 1b46a422aa52a90c9dd7b168be1fed9c4273b6b2. --- lib/ansible/playbook/become.py | 7 +++---- lib/ansible/playbook/task.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/ansible/playbook/become.py b/lib/ansible/playbook/become.py index cf13e2d1c3..1e579751d4 100644 --- a/lib/ansible/playbook/become.py +++ b/lib/ansible/playbook/become.py @@ -106,11 +106,10 @@ class Become: ''' Override for the 'become' getattr fetcher, used from Base. ''' - value = self._attributes['become'] if hasattr(self, '_get_parent_attribute'): - if self._get_parent_attribute('become'): - return True - return value + return self._get_parent_attribute('become') + else: + return self._attributes['become'] def _get_attr_become_method(self): ''' diff --git a/lib/ansible/playbook/task.py b/lib/ansible/playbook/task.py index f623f0566f..154ff53d5e 100644 --- a/lib/ansible/playbook/task.py +++ b/lib/ansible/playbook/task.py @@ -417,7 +417,7 @@ class Task(Base, Conditional, Taggable, Become): def _get_attr_any_errors_fatal(self): ''' - Override for the 'any_errors_fatal' getattr fetcher, used from Base. + Override for the 'tags' getattr fetcher, used from Base. ''' any_errors_fatal = self._attributes['any_errors_fatal'] if hasattr(self, '_get_parent_attribute'):