-
Bug
-
Resolution: Not a Bug
-
Undefined
-
None
-
None
-
None
-
None
-
rhel-sst-system-roles
-
None
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
None
-
None
-
Bug Fix
-
None
By using a different loop variable, we can avoid WARNING messages related to loop variables when calling the `selinux` role from another role.
Fixes: https://github.com/linux-system-roles/selinux/issues/216 .
Enhancement: Avoid the warning message:
```
[WARNING]: TASK: fedora.linux_system_roles.selinux : Restore SELinux labels on filesystem tree: The loop variable 'item' is already in use.
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.
```
Reason: Although I am not aware of any errors when using the role `selinux` without this fix, the warning message (printed in bold and in a different than usual color - violet in my tests) adds lines to the output which can confuse users.
Result: The warning message `[WARNING]: TASK: ... "The loop variable 'item' is already in use." is no longer displayed when calling the role from another role.
Issue Tracker Tickets (Jira or BZ if any): N/A
- clones
-
RHEL-19038 fix: no longer use "item" as a loop variable
- Closed
- links to