mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
ci(lint-ansible): fix syntax-check and load-failure fatals
Two fixes for the lint-ansible CI job (failing run 25604499233): 1. Add `community.docker` to requirements/requirements.galaxy.yml so `ansible-galaxy collection install -r ...` pulls it in CI. The collection is referenced in 9+ files (web-app-discourse handlers, svc-db-mariadb/openldap, sys-svc-compose/container, web-app-keycloak/ decidim) but was missing from the requirements list, so syntax-check could not resolve `community.docker.docker_container`. 2. Add a "Generate role include files" step to .github/workflows/ lint-ansible.yml. `tasks/groups/*-roles.yml` are gitignored generated artefacts (per tasks/groups/.gitignore: `*-roles.yml`) referenced from tasks/stages/*.yml; without them ansible-lint reports a fatal load-failure on tasks/groups/desk-roles.yml. The new step runs `PYTHON=python3 bash scripts/setup.sh` (same path the local `make setup` target invokes); pyyaml added to the pip install line as that's the only non-stdlib dep the setup script needs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
57487e5d2d
commit
971fda535a
2 files changed
+11
-1
No files matched your search
@@ -25,13 +25,22 @@ jobs:
|
||||
- name: Install ansible-core + ansible-lint
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install ansible-core ansible-lint
|
||||
pip install ansible-core ansible-lint pyyaml
|
||||
|
||||
- name: Install required Ansible collections
|
||||
run: |
|
||||
ansible-galaxy collection install \
|
||||
-r requirements/requirements.galaxy.yml
|
||||
|
||||
- name: Generate role include files
|
||||
# `tasks/groups/*-roles.yml` are generated artefacts (gitignored
|
||||
# via tasks/groups/.gitignore) referenced by `tasks/stages/*.yml`.
|
||||
# Without them ansible-lint reports a fatal load-failure on
|
||||
# `tasks/groups/desk-roles.yml`. Generate via the same script the
|
||||
# local `make setup` target uses; PyYAML is already on the runner
|
||||
# because we install it above.
|
||||
run: PYTHON=python3 bash scripts/setup.sh
|
||||
|
||||
- name: Show Docker version
|
||||
run: docker version
|
||||
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
collections:
|
||||
- name: kewlfft.aur
|
||||
- name: community.general
|
||||
- name: community.docker
|
||||
- name: hetzner.hcloud
|
||||
Reference in new issue
Block a user