fix(ci): клонировать репозиторий вне /tmp, чтобы Ansible читал ansible.cfg

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
karpenokandCursor committed 2026-11-08 01:21:02 +07:00
1 parent 87d468c8c1
commit fe32ee55c2
1 file changed
+4 -4
+4 -4
View File
@@ -36,18 +36,18 @@ jobs:
sudo apt-get install -y git openssh-client ansible-core python3
fi
rm -rf /tmp/homelab-infra
git clone https://gitea.gunihome.ru/karpenok/homelab-infra.git /tmp/homelab-infra
rm -rf "${HOME}/homelab-infra"
git clone https://gitea.gunihome.ru/karpenok/homelab-infra.git "${HOME}/homelab-infra"
sha="${GITHUB_SHA:-${GITEA_SHA:-}}"
if [ -n "${sha}" ]; then
git -C /tmp/homelab-infra checkout "${sha}"
git -C "${HOME}/homelab-infra" checkout "${sha}"
fi
install -d -m 700 "${HOME}/.ssh"
printf '%s\n' "${RUNNER_SSH_KEY}" > "${HOME}/.ssh/id_ed25519"
chmod 600 "${HOME}/.ssh/id_ed25519"
cd /tmp/homelab-infra
cd "${HOME}/homelab-infra"
ansible-inventory -i inventories/prod/hosts.yml --list > /tmp/inventory.json
python3 - <<'PY'
import json, subprocess