Skip to content
Snippets Groups Projects
Unverified Commit d870a3ee authored by Max Gautier's avatar Max Gautier Committed by GitHub
Browse files

Avoid potential loop_var shadowing (#11162)

With CentOS, kubespray currently produces the following warning:

[WARNING]: TASK: bootstrap-os : Enable Oracle Linux repo: The loop variable
'item' 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.

This could bites us in nasty ways, so fix it.
parent 41036e3b
No related branches found
No related tags found
No related merge requests found
......@@ -24,10 +24,12 @@
- vars/
skip: True
- name: Include tasks
include_tasks: "{{ item }}"
include_tasks: "{{ included_tasks_file }}"
with_first_found:
- <<: *search
paths: []
loop_control:
loop_var: included_tasks_file
- name: Create remote_tmp for it is used by another module
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment