fix: run health checks with script module
Deploy Cluster / Terraform (push) Successful in 32s
Deploy Cluster / Ansible (push) Successful in 33m48s

This commit is contained in:
2026-05-01 20:30:23 +00:00
parent 0333344a0a
commit 4b9c07b536
+6 -2
View File
@@ -1039,7 +1039,9 @@ jobs:
working-directory: ansible
run: |
set -euo pipefail
ansible -i inventory.ini 'control_plane[0]' -m shell -a '
health_script="$(mktemp)"
cat >"${health_script}" <<'EOF'
#!/usr/bin/env bash
set -euo pipefail
kubectl get nodes -o wide
kubectl -n flux-system get gitrepositories,kustomizations,helmreleases,ocirepositories
@@ -1073,7 +1075,9 @@ jobs:
kubectl -n kube-system get pods -o wide
kubectl -n tailscale-system get pods -o wide
kubectl -n external-secrets get pods -o wide
' -e ansible_shell_executable=/bin/bash
EOF
chmod +x "${health_script}"
ansible -i inventory.ini 'control_plane[0]' -m script -a "${health_script}"
env:
ANSIBLE_HOST_KEY_CHECKING: "False"