You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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.
As indicated in the warning message, we can avoid this message by replacing item in the selinux role with something else, e.g. line_item, and also adding:
loop_control:
loop_var: line_item
to the affected tasks.
The text was updated successfully, but these errors were encountered:
berndfinger
added a commit
to berndfinger/selinux
that referenced
this issue
Dec 7, 2023
By using a different loop variable, we can avoid WARNING messages
related to loop variables when calling the selinux role from another
role.
Fixes: linux-system-roles#216
Signed-off-by: Bernd Finger <bfinger@redhat.com>
By using a different loop variable, we can avoid WARNING messages
related to loop variables when calling the selinux role from another
role.
Fixes: #216
Signed-off-by: Bernd Finger <bfinger@redhat.com>
When calling the
selinux
role from another role and looping over variables, as in https://github.com/sap-linuxlab/community.sap_install/blob/5b920752aa818fcd9fe96ce740bffaa314baf99e/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml#L108 (the task is looping over the listsap_general_preconfigure_sap_directories
, which is assigned to the selinux variableselinux_restore_dirs
), messages like the following are displayed:As indicated in the warning message, we can avoid this message by replacing
item
in theselinux
role with something else, e.g.line_item
, and also adding:to the affected tasks.
The text was updated successfully, but these errors were encountered: