Skip to content

Commit 06d16bc

Browse files
committed
Fix day-2 playbook: Add KUBECONFIG environment to all task includes
All tasks that use kubernetes.core modules need KUBECONFIG set. The day-2 playbook was including tasks without setting the environment, causing 'Invalid kube-config file' errors. Fixed by adding environment block to all include_tasks that interact with Kubernetes API: - ACM ClusterImageSets - Clair disconnected configuration - Catalogsource ACM policies - Model configurations - VMaaS validation
1 parent 4b03ffa commit 06d16bc

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

playbooks/06-day2.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
file: ../operators/advanced-cluster-management/acm_cis.yaml
3636
apply:
3737
tags: acm-cis
38+
environment:
39+
KUBECONFIG: "{{ workingDir }}/ocp-cluster/auth/kubeconfig"
3840
tags: acm-cis
3941

4042
- name: Configure Quay in disconnected environments
@@ -51,6 +53,8 @@
5153
file: ../operators/quay-operator/clair_disconnected.yaml
5254
apply:
5355
tags: clair-disconnected
56+
environment:
57+
KUBECONFIG: "{{ workingDir }}/ocp-cluster/auth/kubeconfig"
5458
tags: clair-disconnected
5559

5660
- name: Mirrored catalogsource configuration ACM policy
@@ -62,6 +66,8 @@
6266
file: tasks/catalogsource.yaml
6367
apply:
6468
tags: acm-policy-catalogsources
69+
environment:
70+
KUBECONFIG: "{{ workingDir }}/ocp-cluster/auth/kubeconfig"
6571
loop: "{{ openshift_versions }}"
6672
loop_control:
6773
loop_var: openshift_version
@@ -72,11 +78,15 @@
7278
file: tasks/model_config.yaml
7379
apply:
7480
tags: model-config
81+
environment:
82+
KUBECONFIG: "{{ workingDir }}/ocp-cluster/auth/kubeconfig"
7583
tags: model-config
7684

7785
- name: Kubevirt - VMaaS
7886
ansible.builtin.include_tasks:
7987
file: tasks/vmaas_validation.yaml
8088
apply:
8189
tags: vmaas
90+
environment:
91+
KUBECONFIG: "{{ workingDir }}/ocp-cluster/auth/kubeconfig"
8292
tags: vmaas

0 commit comments

Comments
 (0)