Skip to content

Commit

Permalink
refactor: ansible-lint - vars cannot be reserved names
Browse files Browse the repository at this point in the history
https://ansible.readthedocs.io/projects/lint/rules/var-naming/
`var-naming[no-reserved]: Variables names must not be Ansible reserved names`

Fixes this error:

```
var-naming[no-reserved]: Variables names must not be Ansible reserved names. (tasks)
```

Signed-off-by: Rich Megginson <[email protected]>
  • Loading branch information
richm committed Jul 12, 2023
1 parent c462d79 commit 98677b6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions roles/rsyslog/tasks/main_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@

- name: Run input sub-tasks
include_tasks:
file: "{{ tasks }}"
file: "{{ task_file }}"
vars:
tasks: "{{ role_path }}/tasks/inputs/{{ input_item.type }}/main.yml"
task_file: "{{ role_path }}/tasks/inputs/{{ input_item.type }}/main.yml"
__rsyslog_input: "{{ input_item }}"
loop: '{{ rsyslog_inputs | sort(attribute="type") }}'
loop_control:
Expand Down Expand Up @@ -228,9 +228,10 @@

- name: Run output sub-tasks
include_tasks:
file: "{{ tasks }}"
file: "{{ task_file }}"
vars:
tasks: "{{ role_path }}/tasks/outputs/{{ output_item.type }}/main.yml"
task_file: >-
{{ role_path }}/tasks/outputs/{{ output_item.type }}/main.yml
__rsyslog_output: "{{ output_item }}"
loop: "{{ rsyslog_outputs }}"
loop_control:
Expand Down

0 comments on commit 98677b6

Please sign in to comment.