From c1d37f95c6bb70a91cf5c6850ba06274b7bbf221 Mon Sep 17 00:00:00 2001 From: Przemyslaw Roguski Date: Tue, 4 Aug 2026 18:01:17 +0200 Subject: [PATCH 1/4] feat: add OCP version compatibility check Add a validate_ocp_version role that reads ocp_versions from pattern-metadata.yaml and checks the target cluster version before installation. Explicitly unsupported versions cause a hard fail; versions below the minimum trigger a warning. Patterns without ocp_versions metadata are unaffected (graceful skip). Override with SKIP_OCP_VERSION_CHECK=true for testing. Signed-off-by: Przemyslaw Roguski Co-authored-by: Cursor --- playbooks/validate_cluster.yml | 3 +- roles/validate_ocp_version/defaults/main.yml | 3 + roles/validate_ocp_version/tasks/main.yml | 123 +++++++++++++++++++ 3 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 roles/validate_ocp_version/defaults/main.yml create mode 100644 roles/validate_ocp_version/tasks/main.yml diff --git a/playbooks/validate_cluster.yml b/playbooks/validate_cluster.yml index 82e475e..15de505 100644 --- a/playbooks/validate_cluster.yml +++ b/playbooks/validate_cluster.yml @@ -1,5 +1,5 @@ --- -- name: Validates that we are logged into a cluster with a default storage class +- name: Validates cluster connectivity, storage class, and OCP version compatibility hosts: localhost connection: local gather_facts: false @@ -7,3 +7,4 @@ - role: pattern_settings # set general pattern vars - role: install_settings # set pattern-install specific vars - role: validate_cluster + - role: validate_ocp_version diff --git a/roles/validate_ocp_version/defaults/main.yml b/roles/validate_ocp_version/defaults/main.yml new file mode 100644 index 0000000..727193c --- /dev/null +++ b/roles/validate_ocp_version/defaults/main.yml @@ -0,0 +1,3 @@ +--- +# Minimum OCP version considered supported when not specified in pattern-metadata.yaml +default_minimum_supported_ocp_version: "4.20" diff --git a/roles/validate_ocp_version/tasks/main.yml b/roles/validate_ocp_version/tasks/main.yml new file mode 100644 index 0000000..a5a1f46 --- /dev/null +++ b/roles/validate_ocp_version/tasks/main.yml @@ -0,0 +1,123 @@ +--- +- name: Check for SKIP_OCP_VERSION_CHECK override + ansible.builtin.set_fact: + _skip_ocp_version_check: "{{ lookup('env', 'SKIP_OCP_VERSION_CHECK') | default('false', true) | bool }}" + +- name: Skip OCP version check if explicitly disabled + ansible.builtin.debug: + msg: "OCP version compatibility check skipped (SKIP_OCP_VERSION_CHECK=true)." + when: _skip_ocp_version_check + +- name: Run OCP version compatibility check + when: not _skip_ocp_version_check + block: + - name: Read pattern-metadata.yaml + ansible.builtin.set_fact: + _pattern_metadata: "{{ lookup('file', pattern_dir + '/pattern-metadata.yaml', errors='ignore') | default('', true) | from_yaml | default({}, true) }}" + + - name: Check if ocp_versions section exists in metadata + ansible.builtin.set_fact: + _has_ocp_versions: "{{ _pattern_metadata.ocp_versions is defined and _pattern_metadata.ocp_versions is mapping }}" + + - name: Skip version check when metadata has no ocp_versions section + ansible.builtin.debug: + msg: "No ocp_versions section found in pattern-metadata.yaml — skipping OCP version compatibility check." + when: not _has_ocp_versions + + - name: Validate OCP version compatibility + when: _has_ocp_versions + block: + - name: Extract cluster OCP version + ansible.builtin.set_fact: + _cluster_ocp_version: "{{ cluster_info.version.server.kubernetes.major ~ '.' ~ cluster_info.version.server.kubernetes.minor }}" + + - name: Fetch ClusterVersion to get the OCP semantic version + kubernetes.core.k8s_info: + api_version: config.openshift.io/v1 + kind: ClusterVersion + name: version + register: _cluster_version_info + failed_when: false + + - name: Extract OCP version from ClusterVersion + ansible.builtin.set_fact: + _cluster_ocp_version: >- + {{ (_cluster_version_info.resources[0].status.desired.version | default('')) + | regex_search('^(\d+\.\d+)') }} + when: + - _cluster_version_info.resources | default([]) | length > 0 + - _cluster_version_info.resources[0].status.desired.version is defined + + - name: Resolve minimum supported OCP version + ansible.builtin.set_fact: + _minimum_ocp_version: "{{ _pattern_metadata.ocp_versions.minimum | default(default_minimum_supported_ocp_version) }}" + + - name: Collect unsupported versions list + ansible.builtin.set_fact: + _unsupported_versions: "{{ _pattern_metadata.ocp_versions.unsupported | default([]) }}" + + - name: Build unsupported version strings for lookup + ansible.builtin.set_fact: + _unsupported_version_strings: "{{ _unsupported_versions | map(attribute='version') | list }}" + + - name: Display detected OCP version + ansible.builtin.debug: + msg: "Detected cluster OCP version: {{ _cluster_ocp_version }}" + + - name: Check if cluster version is explicitly unsupported + ansible.builtin.set_fact: + _is_unsupported: "{{ _cluster_ocp_version in _unsupported_version_strings }}" + + - name: Find unsupported version details + ansible.builtin.set_fact: + _unsupported_reason: "{{ (_unsupported_versions | selectattr('version', 'equalto', _cluster_ocp_version) | first).reason | default('No reason specified.') }}" + when: _is_unsupported + + - name: Fail on explicitly unsupported OCP version + ansible.builtin.fail: + msg: | + + ╔══════════════════════════════════════════════════════════════════╗ + ║ OCP VERSION NOT SUPPORTED ║ + ╠══════════════════════════════════════════════════════════════════╣ + ║ ║ + ║ Pattern: {{ (_pattern_metadata.display_name | default(_pattern_metadata.name | default('unknown'))) | truncate(46) }} + ║ Cluster: OCP {{ _cluster_ocp_version }} + ║ ║ + ║ This OCP version is explicitly listed as unsupported. ║ + ║ ║ + ║ Reason: {{ _unsupported_reason | truncate(52) }} + ║ ║ + ║ To override this check (e.g. for testing), re-run with: ║ + ║ SKIP_OCP_VERSION_CHECK=true ./pattern.sh make install ║ + ║ ║ + ╚══════════════════════════════════════════════════════════════════╝ + when: _is_unsupported + + - name: Check if cluster version is below minimum supported + ansible.builtin.set_fact: + _is_below_minimum: "{{ _cluster_ocp_version is version(_minimum_ocp_version, '<') }}" + + - name: Warn when OCP version is below minimum supported + ansible.builtin.debug: + msg: | + + ┌──────────────────────────────────────────────────────────────────┐ + │ WARNING │ + ├──────────────────────────────────────────────────────────────────┤ + │ │ + │ Your cluster is running OCP {{ _cluster_ocp_version }}, which is below the │ + │ minimum supported version ({{ _minimum_ocp_version }}) for this pattern. │ + │ │ + │ The installation will proceed, but you may encounter issues │ + │ with operator availability or component compatibility. │ + │ │ + │ For the best experience, please use OCP {{ _minimum_ocp_version }} or later. │ + │ │ + └──────────────────────────────────────────────────────────────────┘ + when: _is_below_minimum + + - name: Confirm OCP version is compatible + ansible.builtin.debug: + msg: "OK: OCP {{ _cluster_ocp_version }} is compatible with this pattern (minimum: {{ _minimum_ocp_version }})." + when: not _is_below_minimum and not _is_unsupported From ecab1b38d38980c3f955545580efd6962707b40d Mon Sep 17 00:00:00 2001 From: Przemyslaw Roguski Date: Wed, 5 Aug 2026 17:38:13 +0200 Subject: [PATCH 2/4] fix: address review feedback on OCP version check - Rename SKIP_OCP_VERSION_CHECK to DISABLE_OCP_VERSION_CHECK (VP convention) - Remove Kubernetes version extraction (k8s version != OCP version) - Make ClusterVersion CVO fetch unconditional with assertion - Replace errors='ignore' with stat + slurp + rescue for proper handling of missing vs malformed pattern-metadata.yaml Signed-off-by: Przemyslaw Roguski Co-authored-by: Cursor --- roles/validate_ocp_version/tasks/main.yml | 233 ++++++++++++---------- 1 file changed, 128 insertions(+), 105 deletions(-) diff --git a/roles/validate_ocp_version/tasks/main.yml b/roles/validate_ocp_version/tasks/main.yml index a5a1f46..a148704 100644 --- a/roles/validate_ocp_version/tasks/main.yml +++ b/roles/validate_ocp_version/tasks/main.yml @@ -1,123 +1,146 @@ --- -- name: Check for SKIP_OCP_VERSION_CHECK override +- name: Check for DISABLE_OCP_VERSION_CHECK override ansible.builtin.set_fact: - _skip_ocp_version_check: "{{ lookup('env', 'SKIP_OCP_VERSION_CHECK') | default('false', true) | bool }}" + _disable_ocp_version_check: "{{ lookup('env', 'DISABLE_OCP_VERSION_CHECK') | default('false', true) | bool }}" -- name: Skip OCP version check if explicitly disabled +- name: OCP version check disabled ansible.builtin.debug: - msg: "OCP version compatibility check skipped (SKIP_OCP_VERSION_CHECK=true)." - when: _skip_ocp_version_check + msg: "OCP version compatibility check disabled (DISABLE_OCP_VERSION_CHECK=true)." + when: _disable_ocp_version_check - name: Run OCP version compatibility check - when: not _skip_ocp_version_check + when: not _disable_ocp_version_check block: - - name: Read pattern-metadata.yaml - ansible.builtin.set_fact: - _pattern_metadata: "{{ lookup('file', pattern_dir + '/pattern-metadata.yaml', errors='ignore') | default('', true) | from_yaml | default({}, true) }}" + - name: Check pattern-metadata.yaml exists + ansible.builtin.stat: + path: "{{ pattern_dir }}/pattern-metadata.yaml" + register: _metadata_file - - name: Check if ocp_versions section exists in metadata - ansible.builtin.set_fact: - _has_ocp_versions: "{{ _pattern_metadata.ocp_versions is defined and _pattern_metadata.ocp_versions is mapping }}" - - - name: Skip version check when metadata has no ocp_versions section + - name: Skip version check when pattern-metadata.yaml is missing ansible.builtin.debug: - msg: "No ocp_versions section found in pattern-metadata.yaml — skipping OCP version compatibility check." - when: not _has_ocp_versions + msg: "No pattern-metadata.yaml found — skipping OCP version compatibility check." + when: not _metadata_file.stat.exists - name: Validate OCP version compatibility - when: _has_ocp_versions + when: _metadata_file.stat.exists block: - - name: Extract cluster OCP version - ansible.builtin.set_fact: - _cluster_ocp_version: "{{ cluster_info.version.server.kubernetes.major ~ '.' ~ cluster_info.version.server.kubernetes.minor }}" - - - name: Fetch ClusterVersion to get the OCP semantic version - kubernetes.core.k8s_info: - api_version: config.openshift.io/v1 - kind: ClusterVersion - name: version - register: _cluster_version_info - failed_when: false - - - name: Extract OCP version from ClusterVersion - ansible.builtin.set_fact: - _cluster_ocp_version: >- - {{ (_cluster_version_info.resources[0].status.desired.version | default('')) - | regex_search('^(\d+\.\d+)') }} - when: - - _cluster_version_info.resources | default([]) | length > 0 - - _cluster_version_info.resources[0].status.desired.version is defined - - - name: Resolve minimum supported OCP version - ansible.builtin.set_fact: - _minimum_ocp_version: "{{ _pattern_metadata.ocp_versions.minimum | default(default_minimum_supported_ocp_version) }}" - - - name: Collect unsupported versions list - ansible.builtin.set_fact: - _unsupported_versions: "{{ _pattern_metadata.ocp_versions.unsupported | default([]) }}" + - name: Read pattern-metadata.yaml + ansible.builtin.slurp: + src: "{{ pattern_dir }}/pattern-metadata.yaml" + register: _metadata_raw - - name: Build unsupported version strings for lookup + - name: Parse pattern-metadata.yaml ansible.builtin.set_fact: - _unsupported_version_strings: "{{ _unsupported_versions | map(attribute='version') | list }}" - - - name: Display detected OCP version - ansible.builtin.debug: - msg: "Detected cluster OCP version: {{ _cluster_ocp_version }}" + _pattern_metadata: "{{ _metadata_raw.content | b64decode | from_yaml }}" + rescue: + - name: Fail on malformed pattern-metadata.yaml + ansible.builtin.fail: + msg: "pattern-metadata.yaml exists but contains invalid YAML. Please fix the file before proceeding." - - name: Check if cluster version is explicitly unsupported + - name: Check if ocp_versions section exists in metadata ansible.builtin.set_fact: - _is_unsupported: "{{ _cluster_ocp_version in _unsupported_version_strings }}" + _has_ocp_versions: "{{ _pattern_metadata.ocp_versions is defined and _pattern_metadata.ocp_versions is mapping }}" - - name: Find unsupported version details - ansible.builtin.set_fact: - _unsupported_reason: "{{ (_unsupported_versions | selectattr('version', 'equalto', _cluster_ocp_version) | first).reason | default('No reason specified.') }}" - when: _is_unsupported - - - name: Fail on explicitly unsupported OCP version - ansible.builtin.fail: - msg: | - - ╔══════════════════════════════════════════════════════════════════╗ - ║ OCP VERSION NOT SUPPORTED ║ - ╠══════════════════════════════════════════════════════════════════╣ - ║ ║ - ║ Pattern: {{ (_pattern_metadata.display_name | default(_pattern_metadata.name | default('unknown'))) | truncate(46) }} - ║ Cluster: OCP {{ _cluster_ocp_version }} - ║ ║ - ║ This OCP version is explicitly listed as unsupported. ║ - ║ ║ - ║ Reason: {{ _unsupported_reason | truncate(52) }} - ║ ║ - ║ To override this check (e.g. for testing), re-run with: ║ - ║ SKIP_OCP_VERSION_CHECK=true ./pattern.sh make install ║ - ║ ║ - ╚══════════════════════════════════════════════════════════════════╝ - when: _is_unsupported - - - name: Check if cluster version is below minimum supported - ansible.builtin.set_fact: - _is_below_minimum: "{{ _cluster_ocp_version is version(_minimum_ocp_version, '<') }}" - - - name: Warn when OCP version is below minimum supported - ansible.builtin.debug: - msg: | - - ┌──────────────────────────────────────────────────────────────────┐ - │ WARNING │ - ├──────────────────────────────────────────────────────────────────┤ - │ │ - │ Your cluster is running OCP {{ _cluster_ocp_version }}, which is below the │ - │ minimum supported version ({{ _minimum_ocp_version }}) for this pattern. │ - │ │ - │ The installation will proceed, but you may encounter issues │ - │ with operator availability or component compatibility. │ - │ │ - │ For the best experience, please use OCP {{ _minimum_ocp_version }} or later. │ - │ │ - └──────────────────────────────────────────────────────────────────┘ - when: _is_below_minimum - - - name: Confirm OCP version is compatible + - name: Skip version check when metadata has no ocp_versions section ansible.builtin.debug: - msg: "OK: OCP {{ _cluster_ocp_version }} is compatible with this pattern (minimum: {{ _minimum_ocp_version }})." - when: not _is_below_minimum and not _is_unsupported + msg: "No ocp_versions section found in pattern-metadata.yaml — skipping OCP version compatibility check." + when: not _has_ocp_versions + + - name: Check OCP version against compatibility matrix + when: _has_ocp_versions + block: + - name: Fetch ClusterVersion from CVO + kubernetes.core.k8s_info: + api_version: config.openshift.io/v1 + kind: ClusterVersion + name: version + register: _cluster_version_info + + - name: Assert ClusterVersion is available + ansible.builtin.assert: + that: + - _cluster_version_info.resources | default([]) | length > 0 + - _cluster_version_info.resources[0].status.desired.version is defined + fail_msg: | + Could not retrieve the ClusterVersion resource from the cluster. + Ensure you are connected to an OpenShift cluster (not vanilla Kubernetes). + + - name: Extract OCP version from ClusterVersion + ansible.builtin.set_fact: + _cluster_ocp_version: >- + {{ _cluster_version_info.resources[0].status.desired.version + | regex_search('^(\d+\.\d+)') }} + + - name: Resolve minimum supported OCP version + ansible.builtin.set_fact: + _minimum_ocp_version: "{{ _pattern_metadata.ocp_versions.minimum | default(default_minimum_supported_ocp_version) }}" + + - name: Collect unsupported versions list + ansible.builtin.set_fact: + _unsupported_versions: "{{ _pattern_metadata.ocp_versions.unsupported | default([]) }}" + + - name: Build unsupported version strings for lookup + ansible.builtin.set_fact: + _unsupported_version_strings: "{{ _unsupported_versions | map(attribute='version') | list }}" + + - name: Display detected OCP version + ansible.builtin.debug: + msg: "Detected cluster OCP version: {{ _cluster_ocp_version }}" + + - name: Check if cluster version is explicitly unsupported + ansible.builtin.set_fact: + _is_unsupported: "{{ _cluster_ocp_version in _unsupported_version_strings }}" + + - name: Find unsupported version details + ansible.builtin.set_fact: + _unsupported_reason: "{{ (_unsupported_versions | selectattr('version', 'equalto', _cluster_ocp_version) | first).reason | default('No reason specified.') }}" + when: _is_unsupported + + - name: Fail on explicitly unsupported OCP version + ansible.builtin.fail: + msg: | + + ╔══════════════════════════════════════════════════════════════════╗ + ║ OCP VERSION NOT SUPPORTED ║ + ╠══════════════════════════════════════════════════════════════════╣ + ║ ║ + ║ Pattern: {{ (_pattern_metadata.display_name | default(_pattern_metadata.name | default('unknown'))) | truncate(46) }} + ║ Cluster: OCP {{ _cluster_ocp_version }} + ║ ║ + ║ This OCP version is explicitly listed as unsupported. ║ + ║ ║ + ║ Reason: {{ _unsupported_reason | truncate(52) }} + ║ ║ + ║ To override this check (e.g. for testing), re-run with: ║ + ║ DISABLE_OCP_VERSION_CHECK=true ./pattern.sh make install ║ + ║ ║ + ╚══════════════════════════════════════════════════════════════════╝ + when: _is_unsupported + + - name: Check if cluster version is below minimum supported + ansible.builtin.set_fact: + _is_below_minimum: "{{ _cluster_ocp_version is version(_minimum_ocp_version, '<') }}" + + - name: Warn when OCP version is below minimum supported + ansible.builtin.debug: + msg: | + + ┌──────────────────────────────────────────────────────────────────┐ + │ WARNING │ + ├──────────────────────────────────────────────────────────────────┤ + │ │ + │ Your cluster is running OCP {{ _cluster_ocp_version }}, which is below the │ + │ minimum supported version ({{ _minimum_ocp_version }}) for this pattern. │ + │ │ + │ The installation will proceed, but you may encounter issues │ + │ with operator availability or component compatibility. │ + │ │ + │ For the best experience, please use OCP {{ _minimum_ocp_version }} or later. │ + │ │ + └──────────────────────────────────────────────────────────────────┘ + when: _is_below_minimum + + - name: Confirm OCP version is compatible + ansible.builtin.debug: + msg: "OK: OCP {{ _cluster_ocp_version }} is compatible with this pattern (minimum: {{ _minimum_ocp_version }})." + when: not _is_below_minimum and not _is_unsupported From f69fba4bc9f025137d4bab5e189cbec91d83bd32 Mon Sep 17 00:00:00 2001 From: Przemyslaw Roguski Date: Thu, 6 Aug 2026 13:29:12 +0200 Subject: [PATCH 3/4] fix: wrap rescue block properly, lower default minimum to 4.18 Co-authored-by: Cursor --- roles/validate_ocp_version/defaults/main.yml | 2 +- roles/validate_ocp_version/tasks/main.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/roles/validate_ocp_version/defaults/main.yml b/roles/validate_ocp_version/defaults/main.yml index 727193c..e606989 100644 --- a/roles/validate_ocp_version/defaults/main.yml +++ b/roles/validate_ocp_version/defaults/main.yml @@ -1,3 +1,3 @@ --- # Minimum OCP version considered supported when not specified in pattern-metadata.yaml -default_minimum_supported_ocp_version: "4.20" +default_minimum_supported_ocp_version: "4.18" diff --git a/roles/validate_ocp_version/tasks/main.yml b/roles/validate_ocp_version/tasks/main.yml index a148704..50d7e4c 100644 --- a/roles/validate_ocp_version/tasks/main.yml +++ b/roles/validate_ocp_version/tasks/main.yml @@ -30,8 +30,10 @@ register: _metadata_raw - name: Parse pattern-metadata.yaml - ansible.builtin.set_fact: - _pattern_metadata: "{{ _metadata_raw.content | b64decode | from_yaml }}" + block: + - name: Decode and parse pattern-metadata.yaml + ansible.builtin.set_fact: + _pattern_metadata: "{{ _metadata_raw.content | b64decode | from_yaml }}" rescue: - name: Fail on malformed pattern-metadata.yaml ansible.builtin.fail: From 391215cd512255d5be988df161af3628e15d92a2 Mon Sep 17 00:00:00 2001 From: Przemyslaw Roguski Date: Thu, 6 Aug 2026 18:57:16 +0200 Subject: [PATCH 4/4] rename env var to VP_DISABLE_OCP_VERSION_CHECK, remove text boxes, add role to operator_deploy Co-authored-by: Cursor --- playbooks/operator_deploy.yml | 1 + roles/validate_ocp_version/tasks/main.yml | 50 +++++++---------------- 2 files changed, 16 insertions(+), 35 deletions(-) diff --git a/playbooks/operator_deploy.yml b/playbooks/operator_deploy.yml index 9758b4d..aca1567 100644 --- a/playbooks/operator_deploy.yml +++ b/playbooks/operator_deploy.yml @@ -9,6 +9,7 @@ - role: install_settings # set pattern-install specific vars - role: validate_prereq # ensure installation dependencies are present - role: validate_cluster # ensure a cluster is connected and has a default storage class + - role: validate_ocp_version - role: pattern_install_template # render the pattern-install helm chart tasks: diff --git a/roles/validate_ocp_version/tasks/main.yml b/roles/validate_ocp_version/tasks/main.yml index 50d7e4c..45d7269 100644 --- a/roles/validate_ocp_version/tasks/main.yml +++ b/roles/validate_ocp_version/tasks/main.yml @@ -1,11 +1,11 @@ --- -- name: Check for DISABLE_OCP_VERSION_CHECK override +- name: Check for VP_DISABLE_OCP_VERSION_CHECK override ansible.builtin.set_fact: - _disable_ocp_version_check: "{{ lookup('env', 'DISABLE_OCP_VERSION_CHECK') | default('false', true) | bool }}" + _disable_ocp_version_check: "{{ lookup('env', 'VP_DISABLE_OCP_VERSION_CHECK') | default('false', true) | bool }}" - name: OCP version check disabled ansible.builtin.debug: - msg: "OCP version compatibility check disabled (DISABLE_OCP_VERSION_CHECK=true)." + msg: "OCP version compatibility check disabled (VP_DISABLE_OCP_VERSION_CHECK=true)." when: _disable_ocp_version_check - name: Run OCP version compatibility check @@ -100,23 +100,12 @@ - name: Fail on explicitly unsupported OCP version ansible.builtin.fail: - msg: | - - ╔══════════════════════════════════════════════════════════════════╗ - ║ OCP VERSION NOT SUPPORTED ║ - ╠══════════════════════════════════════════════════════════════════╣ - ║ ║ - ║ Pattern: {{ (_pattern_metadata.display_name | default(_pattern_metadata.name | default('unknown'))) | truncate(46) }} - ║ Cluster: OCP {{ _cluster_ocp_version }} - ║ ║ - ║ This OCP version is explicitly listed as unsupported. ║ - ║ ║ - ║ Reason: {{ _unsupported_reason | truncate(52) }} - ║ ║ - ║ To override this check (e.g. for testing), re-run with: ║ - ║ DISABLE_OCP_VERSION_CHECK=true ./pattern.sh make install ║ - ║ ║ - ╚══════════════════════════════════════════════════════════════════╝ + msg: >- + OCP {{ _cluster_ocp_version }} is not supported by + {{ _pattern_metadata.display_name | default(_pattern_metadata.name | default('this pattern')) }}. + Reason: {{ _unsupported_reason }} + To override this check (e.g. for testing), re-run with: + VP_DISABLE_OCP_VERSION_CHECK=true ./pattern.sh make install when: _is_unsupported - name: Check if cluster version is below minimum supported @@ -125,21 +114,12 @@ - name: Warn when OCP version is below minimum supported ansible.builtin.debug: - msg: | - - ┌──────────────────────────────────────────────────────────────────┐ - │ WARNING │ - ├──────────────────────────────────────────────────────────────────┤ - │ │ - │ Your cluster is running OCP {{ _cluster_ocp_version }}, which is below the │ - │ minimum supported version ({{ _minimum_ocp_version }}) for this pattern. │ - │ │ - │ The installation will proceed, but you may encounter issues │ - │ with operator availability or component compatibility. │ - │ │ - │ For the best experience, please use OCP {{ _minimum_ocp_version }} or later. │ - │ │ - └──────────────────────────────────────────────────────────────────┘ + msg: >- + WARNING: Your cluster is running OCP {{ _cluster_ocp_version }}, which is below the + minimum supported version ({{ _minimum_ocp_version }}) for this pattern. + The installation will proceed, but you may encounter issues with + operator availability or component compatibility. + For the best experience, please use OCP {{ _minimum_ocp_version }} or later. when: _is_below_minimum - name: Confirm OCP version is compatible