From 38468733367a67b7dbe0559ebcf91d4e9e732979 Mon Sep 17 00:00:00 2001 From: Eduardo Olivares Date: Thu, 11 Dec 2025 11:25:11 +0100 Subject: [PATCH] [kustomize_deploy] Fix OLM values.yaml not available to kustomize lookup The kustomize lookup plugin runs on localhost (control node), but the values.yaml file was being copied on the remote host. This caused the generated values to be ignored when kustomize executed. Changed to use slurp + copy with delegate_to localhost to ensure the values.yaml file is available on the control node where kustomize runs. Assisted-By: Claude Code/claude-sonnet-4.5 Signed-off-by: Eduardo Olivares --- roles/kustomize_deploy/tasks/install_operators.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/roles/kustomize_deploy/tasks/install_operators.yml b/roles/kustomize_deploy/tasks/install_operators.yml index d4a76c7367..981e191537 100644 --- a/roles/kustomize_deploy/tasks/install_operators.yml +++ b/roles/kustomize_deploy/tasks/install_operators.yml @@ -47,16 +47,19 @@ ansible.builtin.include_role: name: ci_gen_kustomize_values -- name: Copy generated values.yaml for OLM resources - ansible.builtin.copy: - backup: true - remote_src: true +- name: Slurp generated values.yaml for OLM resources + ansible.builtin.slurp: src: >- {{ (cifmw_kustomize_deploy_basedir, 'artifacts', 'ci_gen_kustomize_values', 'olm-values', 'values.yaml') | path_join }} + register: _cifmw_kustomize_deploy_olm_values_content + +- name: Copy generated values.yaml for OLM resources to localhost + ansible.builtin.copy: + content: "{{ _cifmw_kustomize_deploy_olm_values_content.content | b64decode }}" dest: >- {{ ( @@ -65,6 +68,7 @@ ) | path_join }} mode: "0644" + delegate_to: localhost - name: Generate the OLM kustomization file ansible.builtin.copy: