fix: убрать деплой core-git и apply CT 904 с раннера
ansible-core-mon / deploy (push) Successful in 28s
ansible-core-net / deploy (push) Successful in 1m0s
ansible-core-secrets / deploy (push) Successful in 18s
ansible-ger-nod-02 / deploy (push) Successful in 1m14s
ansible-opnsense / deploy (push) Successful in 8s
ansible-rus-central / deploy (push) Successful in 57s

Раннер живёт на этой машине, job не может её пересобирать.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
karpenokandCursor committed 2026-11-13 22:51:36 +07:00
1 parent f1838991bd
commit db92435117
6 files changed
+19 -63

No files matched your search

-41
View File
@@ -1,41 +0,0 @@
name: ansible-core-git
on:
push:
branches:
- main
paths:
- 'ansible/ansible.cfg'
- 'ansible/ci/**'
- 'ansible/roles/core-git/**'
- 'ansible/roles/cadvisor/**'
- 'ansible/roles/host/**'
- 'ansible/playbooks/core-git.yml'
- 'ansible/playbooks/host.yml'
- 'ansible/playbooks/site.yml'
- 'ansible/inventories/prod/hosts.yml'
- 'ansible/inventories/prod/host_vars/core-git.yml'
- 'ansible/inventories/prod/group_vars/**'
workflow_dispatch:
jobs:
deploy:
runs-on: homelab
container:
image: homelab-ansible:latest
timeout-minutes: 30
steps:
- name: Деплой core-git
env:
INFISICAL_CLIENT_ID: ${{ secrets.INFISICAL_CLIENT_ID }}
INFISICAL_CLIENT_SECRET: ${{ secrets.INFISICAL_CLIENT_SECRET }}
run: |
set -eu
rm -rf "${HOME}/homelab-infra"
git clone http://192.168.1.105:3000/karpenok/homelab-infra.git "${HOME}/homelab-infra"
sha="${GITHUB_SHA:-${GITEA_SHA:-}}"
if [ -n "${sha}" ]; then
git -C "${HOME}/homelab-infra" checkout "${sha}"
fi
chmod -R go-w "${HOME}/homelab-infra"
exec bash "${HOME}/homelab-infra/ansible/ci/deploy-machine.sh" core-git "${{ github.event_name }}" "${{ github.event.before }}" "${{ github.sha }}"
+7 -8
View File
@@ -11,13 +11,12 @@ on:
- netcore
default: netcore
action:
description: 'Действие Terraform (plan / apply / import-core-git)'
description: 'Действие Terraform (plan / apply). CT 904 core-git этот job не меняет.'
required: true
type: choice
options:
- plan
- apply
- import-core-git
default: plan
jobs:
@@ -85,14 +84,14 @@ jobs:
-backend-config="unlock_method=DELETE" \
-backend-config="retry_wait_min=5"
# Job крутится на CT 904. Менять этот контейнер из него нельзя:
# apply перезапустит машину и оборвёт сам job.
exclude=(-exclude=proxmox_virtual_environment_container.core_git)
if [ "${ACTION}" = "plan" ]; then
terraform plan
terraform plan "${exclude[@]}"
elif [ "${ACTION}" = "apply" ]; then
terraform apply -auto-approve
elif [ "${ACTION}" = "import-core-git" ]; then
# CT 904 уже создан; ID в bpg/proxmox: <node>/<vmid>
terraform import 'proxmox_virtual_environment_container.core_git' 'netcore/904'
terraform plan
terraform apply -auto-approve "${exclude[@]}"
else
echo "Неизвестное действие: ${ACTION}" >&2
exit 2