Skip to content

Fix some warnings#155

Open
GerMalaz wants to merge 2 commits into
Oefenweb:masterfrom
GerMalaz:fix_some_warnings
Open

Fix some warnings#155
GerMalaz wants to merge 2 commits into
Oefenweb:masterfrom
GerMalaz:fix_some_warnings

Conversation

@GerMalaz

Copy link
Copy Markdown

There are some warnings when using this role:

```WARNING]:` The loop variable 'item' is already in use.
Origin:

item

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.

Fix: Use loop (and loop_control) instead of with_items.

```[DEPRECATION WARNING]: INJECT_FACTS_AS_VARS default to `True` is deprecated, top-level facts will not be auto injected after the change. This feature will be removed from ansible-core version 2.24.
``` example ```
Use `ansible_facts["fact_name"]` (no `ansible_` prefix) instead.

Fix: as described, ansible_var_name -> ansible_facts['var_name']

GerMalaz added 2 commits May 18, 2026 13:06
Use loop_control and loop_var as suggested.
Replace ansible_var_name with ansible_facts['var_name']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant