--- - name: Minimal VPC Kubernetes + Karpenter Test hosts: localhost gather_facts: yes vars_files: - secrets.yaml vars: cluster_name: "minimal-karpenter-vpc-test" vpc_name: "{{ cluster_name }}-vpc" subnet_name: "{{ cluster_name }}-subnet" instance_profile: "bx2-2x8" image_name: "ibm-ubuntu-22-04-4-minimal-amd64-1" zone: "us-south-1" ssh_key_name: "{{ cluster_name }}-key" kubeconfig_path: "{{ playbook_dir }}/kubeconfig/config" tasks: - name: Verify secrets are loaded ansible.builtin.debug: msg: "Secrets loaded successfully" failed_when: IBM_CLOUD_TOKEN is not defined tags: [always] - name: Setup VPC infrastructure and install Kubernetes ansible.builtin.include_tasks: tasks/setup-vpc-k8s.yml tags: [setup] - name: Install and configure Karpenter ansible.builtin.include_tasks: tasks/install-karpenter.yml tags: [karpenter] - name: Deploy test workload ansible.builtin.include_tasks: tasks/deploy-test-pod.yml tags: [test] - name: Wait 5 minutes for Karpenter to provision nodes ansible.builtin.pause: minutes: 5 tags: [test] - name: Collect logs and pod information ansible.builtin.include_tasks: tasks/collect-logs.yml tags: [logs] - name: Cleanup infrastructure (optional) ansible.builtin.include_tasks: tasks/cleanup.yml tags: [cleanup, never]