From 279e8a03bc4c7aa4af7d7c57acbef9f07251f2db Mon Sep 17 00:00:00 2001 From: tusharjadhav3302 Date: Thu, 23 Jul 2026 17:23:38 +0530 Subject: [PATCH] Add stage override variable to shiftstack role The shiftstack role invokes ocp_testing.yaml with a testconfig that bundles all stages (install + test) in a single ansible-navigator call. The upcoming phased pipeline needs to run install stages in one Zuul job and test stages in another, using the same testconfig file. Add cifmw_shiftstack_stages_override (default: []) that appends --extra-vars to the ansible-navigator command when non-empty, overriding the stages list from the testconfig. This avoids creating per-phase testconfig files in shiftstack-qa and keeps the monolithic job unchanged (empty list = no override = all stages run as before). Related-Issue: OSPRH-33128 Co-authored-by: Cursor AI --- roles/shiftstack/defaults/main.yml | 1 + roles/shiftstack/tasks/test_config.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/shiftstack/defaults/main.yml b/roles/shiftstack/defaults/main.yml index b77c8a558..4355dbe7c 100644 --- a/roles/shiftstack/defaults/main.yml +++ b/roles/shiftstack/defaults/main.yml @@ -53,3 +53,4 @@ cifmw_shiftstack_extra_vars_configmap_name: "shiftstack-extra-vars" cifmw_shiftstack_extra_vars_mount_path: "/home/cloud-admin/extra-vars" # Optional: name of a Kubernetes Secret containing SSH keys to mount into the pod # cifmw_shiftstack_trex_keypair_secret: "trex-keypair" +cifmw_shiftstack_stages_override: [] diff --git a/roles/shiftstack/tasks/test_config.yml b/roles/shiftstack/tasks/test_config.yml index 7f8c5cebb..c64e81688 100644 --- a/roles/shiftstack/tasks/test_config.yml +++ b/roles/shiftstack/tasks/test_config.yml @@ -40,6 +40,7 @@ -e user_cloud={{ cifmw_shiftstack_project_name }} -e hypervisor={{ cifmw_shiftstack_hypervisor }} -e rhoso_kubeconfig={{ cifmw_shiftstack_shiftstackclient_incluster_kubeconfig_dir }}/kubeconfig + {% if cifmw_shiftstack_stages_override | default([]) | length > 0 %}-e '{"stages": {{ cifmw_shiftstack_stages_override | to_json }}}'{% endif %} ansible.builtin.include_tasks: exec_command_in_pod.yml rescue: