Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to silence warning about loop variable already in use #82538

Open
1 task done
agowa opened this issue Jan 14, 2024 · 1 comment
Open
1 task done

Allow to silence warning about loop variable already in use #82538

agowa opened this issue Jan 14, 2024 · 1 comment
Labels
feature This issue/PR relates to a feature request.

Comments

@agowa
Copy link
Contributor

agowa commented Jan 14, 2024

Summary

I'm recursively including a tasks file in one of my roles and I noticed that currently it is not possible to silence the warning about reusing the loop variable. It would be great to be able to somehow say that overwriting a variable is intentional.

Example: https://gitlab.agowa338.de/agowa338-ansible/ansible-arch-makepkg/-/blob/14eb6f1d65e4dff29281b87006d0a60057c360dd/tasks/build/jack.yml#L5

Issue Type

Feature Idea

Component Name

loop_control

Additional Information

- include_tasks: ../build.yml
  loop_control:
    loop_var: item
    loop_var_overwrites: True
  loop:
    - loopItem1
    - loopItem2

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibot ansibot added feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. labels Jan 14, 2024
@ansibot
Copy link
Contributor

ansibot commented Jan 14, 2024

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the component bot command.

@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request.
Projects
None yet
Development

No branches or pull requests

3 participants