summaryrefslogtreecommitdiff
path: root/lib/ansible/playbook/task.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/playbook/task.py')
-rw-r--r--lib/ansible/playbook/task.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/playbook/task.py b/lib/ansible/playbook/task.py
index 1570173f42..f0a7350954 100644
--- a/lib/ansible/playbook/task.py
+++ b/lib/ansible/playbook/task.py
@@ -297,13 +297,13 @@ class Task(Base, Conditional, Taggable, Become):
Generic logic to get the attribute or parent attribute for a task value.
'''
value = self._attributes[attr]
- if self._block and (not value or extend):
+ if self._block and (value is None or extend):
parent_value = getattr(self._block, attr)
if extend:
value = self._extend_value(value, parent_value)
else:
value = parent_value
- if self._task_include and (not value or extend):
+ if self._task_include and (value is None or extend):
parent_value = getattr(self._task_include, attr)
if extend:
value = self._extend_value(value, parent_value)