Files
homelab-infra/.gitea/workflows/ansible-lint.yml
T
karpenok 0f0d4ff7ad
ansible-deploy / plan (push) Successful in 2s
ansible-deploy / deploy (push) Skipped
ansible-lint / lint (push) Successful in 2s
fix(ci): chmod go-w and pass inventory in ansible-lint.yml, untrack pycache
2026-11-15 22:46:27 +07:00

36 lines
1.1 KiB
YAML

name: ansible-lint
on:
push:
branches:
- main
paths:
- 'ansible/**'
jobs:
lint:
runs-on: homelab
container:
image: homelab-ansible:latest
timeout-minutes: 10
steps:
- name: Проверка синтаксиса скриптов, Python и плейбуков
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"
cd "${HOME}/homelab-infra"
sh -n ansible/ci/ansible-target.sh
bash -n ansible/ci/deploy-machine.sh
python3 -m py_compile ansible/ci/ansible-plan.py \
ansible/roles/core-net/remnawave/files/sync_remnawave.py \
ansible/roles/rus-central/netbird/files/sync_access.py
cd ansible
ansible-playbook --syntax-check -i inventories/prod/hosts.yml playbooks/*.yml