Fix: Avoid loop variable collision in MinIO front-proxy include

Replaced default 'item' with explicit loop variable 'minio_proxy' to prevent
conflicts with inner roles (e.g., sys-stk-front-proxy using with_first_found).

This resolves the undefined variable error and removes the Ansible warning
about the loop variable already being in use.

Reference: https://chatgpt.com/share/692c5778-2b24-800f-b203-5b6b2c9b1d4b
This commit is contained in:
2025-11-30 15:41:17 +01:00
parent 7d0489e312
commit 5a65410dd8

View File

@@ -9,11 +9,12 @@
include_role: include_role:
name: sys-stk-front-proxy name: sys-stk-front-proxy
vars: vars:
domain: "{{ item.domain }}" domain: "{{ minio_proxy.domain }}"
http_port: "{{ item.http_port }}" http_port: "{{ minio_proxy.http_port }}"
loop: "{{ MINIO_FRONT_PROXY_MATRIX }}" loop: "{{ MINIO_FRONT_PROXY_MATRIX }}"
loop_control: loop_control:
label: "{{ item.domain }} -> {{ item.http_port }}" loop_var: minio_proxy
label: "{{ minio_proxy.domain }} -> {{ minio_proxy.http_port }}"
- block: - block:
- name: "Check policy (RAW with slash) exists" - name: "Check policy (RAW with slash) exists"