|
5 | 5 | # This file contains the workload orchestrator tasks for the vdm role. |
6 | 6 | # It is included from main.yaml to manage workload orchestration for the deployment. |
7 | 7 |
|
| 8 | +# Workload Orchestrator Overlay Handling |
| 9 | + |
| 10 | +# Check if cluster-role exists in the orchestrator overlay |
| 11 | +- name: Check existence of orchestrator cluster-role |
| 12 | + stat: |
| 13 | + path: "sas-bases/overlays/sas-workload-orchestrator/cluster-role" |
| 14 | + register: orchestrator_cluster_role |
| 15 | + tags: |
| 16 | + - install |
| 17 | + - uninstall |
| 18 | + - update |
| 19 | + |
| 20 | +# Check if cluster-role exists in the orchestrator-server overlay |
| 21 | +- name: Check existence of orchestrator-server cluster-role |
| 22 | + stat: |
| 23 | + path: "sas-bases/overlays/sas-workload-orchestrator-server/cluster-role" |
| 24 | + register: orchestrator_server_cluster_role |
| 25 | + tags: |
| 26 | + - install |
| 27 | + - uninstall |
| 28 | + - update |
| 29 | + |
| 30 | +- name: Set orchestrator resources list |
| 31 | + set_fact: |
| 32 | + orchestrator_resources: >- |
| 33 | + {{ |
| 34 | + [ |
| 35 | + 'overlays/sas-workload-orchestrator/cluster-role' |
| 36 | + if orchestrator_cluster_role.stat.exists | default(false) |
| 37 | + else 'overlays/sas-workload-orchestrator' |
| 38 | + ] |
| 39 | + + |
| 40 | + ( |
| 41 | + ['overlays/sas-workload-orchestrator-server/cluster-role'] |
| 42 | + if orchestrator_server_cluster_role.stat.exists | default(false) |
| 43 | + else [] |
| 44 | + ) |
| 45 | + }} |
| 46 | + tags: |
| 47 | + - install |
| 48 | + - uninstall |
| 49 | + - update |
| 50 | + |
| 51 | + |
8 | 52 | # Add overlay for enabling the SAS Workload Orchestrator if enabled and cadence is recent |
9 | 53 | - name: Workload Orchestrator - Configure SAS Workload Orchestrator Service Account |
10 | 54 | overlay_facts: |
11 | 55 | cadence_name: "{{ V4_CFG_CADENCE_NAME }}" |
12 | 56 | cadence_number: "{{ V4_CFG_CADENCE_VERSION }}" |
13 | 57 | existing: "{{ vdm_overlays }}" |
14 | 58 | add: |
15 | | - - { resources: overlays/sas-workload-orchestrator, min: "2023.08", vdm: false } |
| 59 | + - resources: "{{ orchestrator_resources | join(',') }}" |
| 60 | + min: "2023.08" |
| 61 | + vdm: false |
16 | 62 | when: |
17 | 63 | # Only run if workload orchestrator is enabled |
18 | 64 | - V4_WORKLOAD_ORCHESTRATOR_ENABLED |
|
0 commit comments