Skip to content

Commit

Permalink
chore: auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and ssbarnea committed Sep 23, 2022
1 parent 69bf9f6 commit c306264
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/ansiblelint/rules/no_loop_var_prefix.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ enable_list:
- name: Example playbook
hosts: localhost
tasks:
- name: Does not set a prefix for loop variables.
ansible.builtin.debug:
var: item
loop:
- foo
- bar # <- These items do not have a unique prefix.
- name: Sets
ansible.builtin.debug:
var: zz_item
loop:
- foo
- bar
loop_control:
loop_var: zz_item # <- This prefix is not unique.
- name: Does not set a prefix for loop variables.
ansible.builtin.debug:
var: item
loop:
- foo
- bar # <- These items do not have a unique prefix.
- name: Sets
ansible.builtin.debug:
var: zz_item
loop:
- foo
- bar
loop_control:
loop_var: zz_item # <- This prefix is not unique.
```

## Correct Code
Expand All @@ -42,12 +42,12 @@ enable_list:
- name: Example playbook
hosts: localhost
tasks:
- name: Sets a unique prefix for loop variables.
ansible.builtin.debug:
var: zz_item
loop:
- foo
- bar
loop_control:
loop_var: my_prefix # <- Specifies a unique prefix for loop variables.
- name: Sets a unique prefix for loop variables.
ansible.builtin.debug:
var: zz_item
loop:
- foo
- bar
loop_control:
loop_var: my_prefix # <- Specifies a unique prefix for loop variables.
```

0 comments on commit c306264

Please sign in to comment.