Skip to content

Commit 337b2a8

Browse files
Martin Jacksoncursoragent
andcommitted
fix(ci): ansible-lint job use pinned ansible-core 2.18 + galaxy install
Drop ansible-lint action uv stack (latest ansible-core breaks Galaxy install). Install ansible-lint with ansible-core<2.19, pre-install requirements.yml collections, then lint. Revert .ansible-lint offline so modules resolve. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 69acaaf commit 337b2a8

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

.ansible-lint

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Vim filetype=yaml
22
---
3-
# Skip ansible-galaxy collection install from requirements.yml. Recent ansible-core
4-
# releases can hit Galaxy API KeyError: 'results' during install (CI and local uv).
5-
# Install collections manually or use creator-ee when you need dependency-aware rules.
6-
offline: true
3+
offline: false
74
skip_list:
85
- name[template] # Allow Jinja templating inside task and play names
96
- template-instead-of-copy # Templated files should use template instead of copy

.github/workflows/ansible-lint.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,21 @@ jobs:
1414
with:
1515
persist-credentials: false
1616

17-
- name: Lint Ansible Playbook
18-
uses: ansible/ansible-lint@5fac056c45595896c973fbde871f01f6cb14d74c
17+
# The ansible-lint GitHub action installs via uv with a lock that tracks the newest
18+
# ansible-core; ansible-galaxy collection install then hits Galaxy KeyError: 'results'
19+
# on some 2.19+/2.20 clients. Pin ansible-core to the 2.18 series for a stable Galaxy client.
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
1922
with:
20-
setup_python: "true"
23+
python-version: "3.12"
24+
25+
- name: Install ansible-lint and Galaxy-compatible ansible-core
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install ansible-lint "ansible-core>=2.18.0,<2.19.0"
29+
30+
- name: Install Ansible Galaxy collection dependencies
31+
run: ansible-galaxy collection install -r requirements.yml
32+
33+
- name: Run ansible-lint
34+
run: ansible-lint roles playbooks plugins

0 commit comments

Comments
 (0)