From 82c3c8507c11a9968ec2bd7f1d2aa1d75084cb18 Mon Sep 17 00:00:00 2001 From: Jaison Raju Date: Wed, 15 Jul 2026 13:42:26 +0530 Subject: [PATCH] Signed-off-by: Jaison Raju Mitigate intermittent curl failures to external page Attempt to pull latest kustomize, if it fails then continue if previous download exists in /usr/bin/. If both checks fail then automation will fail. If newer download exists then move to /usr/bin . --- ansible/roles/bootstrap/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/bootstrap/tasks/main.yml b/ansible/roles/bootstrap/tasks/main.yml index 5f1ae45..954fc17 100644 --- a/ansible/roles/bootstrap/tasks/main.yml +++ b/ansible/roles/bootstrap/tasks/main.yml @@ -18,11 +18,11 @@ - name: download kustomize lib shell: - curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash 2> /dev/null || if [ ! -x /usr/bin/kustomize ] ; then exit "install_kustomize.sh download failed" ; fi - name: move the kustomize to usr-bin shell: - mv kustomize /usr/bin/. + if [ -x kustomize ] ; then mv kustomize /usr/bin/. ; fi - name: Download or load OCP inventory include_tasks: includes/download_ocp_inventory.yml @@ -53,4 +53,4 @@ - name: Wait for observability operator to be available shell: | oc wait deployments/observability-operator --for condition=Available --timeout=300s -n openshift-operators - when: telemetry | default(true) \ No newline at end of file + when: telemetry | default(true)