fix: run health checks with script module
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user