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

unsafe-loop[iterator] Rule request: Require all loops have a loop variable #2038

Open
cidrblock opened this issue Mar 23, 2022 · 1 comment
Labels
AAP Ansible Automation Platform enhancement new rule A request for a new rule
Milestone

Comments

@cidrblock
Copy link
Contributor

This is ok:

  loop:
    - red
    - green
    - blue
  loop_control:
    loop_var: rgb_color

This is not, no loop_var

  loop:
    - a
    - b
    - c
@cidrblock cidrblock changed the title Reule request: Require all loops have a loop variable Rule request: Require all loops have a loop variable Mar 23, 2022
@cidrblock cidrblock added the new rule A request for a new rule label Mar 30, 2022
@ganeshrn ganeshrn added the AAP Ansible Automation Platform label May 9, 2022
@cidrblock
Copy link
Contributor Author

cidrblock commented Jul 20, 2022

disallow the default "item" var from propagating outside a single task, even if the initial implementation was just for "import" tasks this would be a good start

@ssbarnea ssbarnea changed the title Rule request: Require all loops have a loop variable unsafe-loop[iterator] Rule request: Require all loops have a loop variable Jul 20, 2022
@ssbarnea ssbarnea added this to the 6.9.x milestone Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AAP Ansible Automation Platform enhancement new rule A request for a new rule
Projects
Status: Backlog
Status: No status
Development

No branches or pull requests

3 participants