@ -423,13 +423,20 @@ class Task(Base, Conditional, Taggable, Become):
prepend = self . _valid_attrs [ attr ] . prepend
prepend = self . _valid_attrs [ attr ] . prepend
try :
try :
value = self . _attributes [ attr ]
value = self . _attributes [ attr ]
if self . _parent and ( value is None or extend ) :
# If parent is static, we can grab attrs from the parent
# otherwise, defer to the grandparent
if getattr ( self . _parent , ' statically_loaded ' , True ) :
if getattr ( self . _parent , ' statically_loaded ' , True ) :
_parent = self . _parent
else :
_parent = self . _parent . _parent
if _parent and ( value is None or extend ) :
if getattr ( _parent , ' statically_loaded ' , True ) :
# vars are always inheritable, other attributes might not be for the partent but still should be for other ancestors
# vars are always inheritable, other attributes might not be for the partent but still should be for other ancestors
if attr != ' vars ' and getattr ( self . _parent , ' _inheritable ' , True ) and hasattr ( self . _parent , ' _get_parent_attribute ' ) :
if attr != ' vars ' and hasattr( _parent , ' _get_parent_attribute ' ) :
parent_value = self . _parent . _get_parent_attribute ( attr )
parent_value = _parent . _get_parent_attribute ( attr )
else :
else :
parent_value = self . _parent . _attributes . get ( attr , None )
parent_value = _parent . _attributes . get ( attr , None )
if extend :
if extend :
value = self . _extend_value ( value , parent_value , prepend )
value = self . _extend_value ( value , parent_value , prepend )