Skip to content

Commit cc92eac

Browse files
committed
[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 <[email protected]>
1 parent e478c44 commit cc92eac

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

roles/kustomize_deploy/tasks/install_operators.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,19 @@
4747
ansible.builtin.include_role:
4848
name: ci_gen_kustomize_values
4949

50-
- name: Copy generated values.yaml for OLM resources
51-
ansible.builtin.copy:
52-
backup: true
53-
remote_src: true
50+
- name: Slurp generated values.yaml for OLM resources
51+
ansible.builtin.slurp:
5452
src: >-
5553
{{
5654
(cifmw_kustomize_deploy_basedir,
5755
'artifacts', 'ci_gen_kustomize_values',
5856
'olm-values', 'values.yaml') | path_join
5957
}}
58+
register: _cifmw_kustomize_deploy_olm_values_content
59+
60+
- name: Copy generated values.yaml for OLM resources to localhost
61+
ansible.builtin.copy:
62+
content: "{{ _cifmw_kustomize_deploy_olm_values_content.content | b64decode }}"
6063
dest: >-
6164
{{
6265
(
@@ -65,6 +68,7 @@
6568
) | path_join
6669
}}
6770
mode: "0644"
71+
delegate_to: localhost
6872

6973
- name: Generate the OLM kustomization file
7074
ansible.builtin.copy:

0 commit comments

Comments
 (0)