Ensure that an empty literal list with loop skips the task (#47129)

This commit is contained in:
Matt Martz 2018-10-16 13:35:10 -05:00 committed by GitHub
parent 4fc6ab55aa
commit 02f4d0a57f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View file

@ -236,7 +236,7 @@ class TaskExecutor:
else:
raise AnsibleError("Unexpected failure in finding the lookup named '%s' in the available lookup plugins" % self._task.loop_with)
elif self._task.loop:
elif self._task.loop is not None:
items = templar.template(self._task.loop)
if not isinstance(items, list):
raise AnsibleError(