mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
Properly look for parent become attribute
Corrects inheritence of the boolean value, which needs some special consideration from other (string/int) values. Fixes #13872
This commit is contained in:
parent
b1223746cd
commit
1b46a422aa
2 changed files with 5 additions and 4 deletions
|
@ -106,10 +106,11 @@ class Become:
|
||||||
'''
|
'''
|
||||||
Override for the 'become' getattr fetcher, used from Base.
|
Override for the 'become' getattr fetcher, used from Base.
|
||||||
'''
|
'''
|
||||||
|
value = self._attributes['become']
|
||||||
if hasattr(self, '_get_parent_attribute'):
|
if hasattr(self, '_get_parent_attribute'):
|
||||||
return self._get_parent_attribute('become')
|
if self._get_parent_attribute('become'):
|
||||||
else:
|
return True
|
||||||
return self._attributes['become']
|
return value
|
||||||
|
|
||||||
def _get_attr_become_method(self):
|
def _get_attr_become_method(self):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -417,7 +417,7 @@ class Task(Base, Conditional, Taggable, Become):
|
||||||
|
|
||||||
def _get_attr_any_errors_fatal(self):
|
def _get_attr_any_errors_fatal(self):
|
||||||
'''
|
'''
|
||||||
Override for the 'tags' getattr fetcher, used from Base.
|
Override for the 'any_errors_fatal' getattr fetcher, used from Base.
|
||||||
'''
|
'''
|
||||||
any_errors_fatal = self._attributes['any_errors_fatal']
|
any_errors_fatal = self._attributes['any_errors_fatal']
|
||||||
if hasattr(self, '_get_parent_attribute'):
|
if hasattr(self, '_get_parent_attribute'):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue