Change error about loop variable in use to a warning
This commit is contained in:
parent
0040c6a4d2
commit
af257c20da
1 changed files with 1 additions and 1 deletions
|
@ -232,7 +232,7 @@ class TaskExecutor:
|
||||||
loop_var = self._task.loop_control.loop_var or 'item'
|
loop_var = self._task.loop_control.loop_var or 'item'
|
||||||
|
|
||||||
if loop_var in task_vars:
|
if loop_var in task_vars:
|
||||||
raise AnsibleError("the loop variable '%s' is already in use. You should set the `loop_var` value in the `loop_control` option for the task to something else to avoid variable collisions" % loop_var)
|
display.warning("The loop variable '%s' is already in use. You should set the `loop_var` value in the `loop_control` option for the task to something else to avoid variable collisions and unexpected behavior." % loop_var)
|
||||||
|
|
||||||
items = self._squash_items(items, loop_var, task_vars)
|
items = self._squash_items(items, loop_var, task_vars)
|
||||||
for item in items:
|
for item in items:
|
||||||
|
|
Loading…
Reference in a new issue