Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/ansible-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Static checks for JetBrew (Ansible). Catches YAML/Ansible parse issues before merge.
name: Ansible CI

on:
pull_request:
push:
branches:
- main
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
lint-and-syntax:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tools
run: |
python -m pip install --upgrade pip
pip install "ansible-core>=2.15,<2.19" yamllint
Comment on lines +30 to +33

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

What are the latest stable versions of ansible-core as of May 2026?

💡 Result:

Latest stable versions of ansible-core (as of 2026-05-14): 1) ansible-core 2.20.5 (stable) PyPI shows ansible-core “Version History” with 2.20.5 dated 2026-04-21 and marked Production/Stable. [1] 2) ansible-core 2.19.9 (stable) PyPI “Version History” lists 2.19.9 dated 2026-04-21 as a published version. [1] 3) ansible-core 2.18.16 (stable) PyPI “Version History” lists 2.18.16 dated 2026-04-21 as a published version. [1] Notes: - PyPI also indicates newer prereleases exist (for example 2.21.0rc1), so 2.20.5 is the newest stable line as of this date. [1] - Ansible’s release/maintenance page describes that multiple ansible-core major/minor release lines can be maintained concurrently (e.g., 2.20, 2.19, 2.18). [2]

Citations:


Update ansible-core version constraint to include latest stable releases.

The constraint >=2.15,<2.19 excludes ansible-core 2.19.x and 2.20.x. As of May 2026, ansible-core 2.20.5 is the latest stable release (along with stable maintenance releases 2.19.9 and 2.18.16). Update the constraint to >=2.15,<2.21 or similar to allow the workflow to use current stable versions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ansible-ci.yml around lines 30 - 33, Update the
ansible-core version constraint in the GitHub Actions "Install tools" step so it
permits current stable releases; replace the existing constraint ">=2.15,<2.19"
used in the pip install command (the line that installs ansible-core in the
"Install tools" step) with a wider upper bound such as ">=2.15,<2.21" to allow
2.19.x and 2.20.x releases.


# ansible-core does not ship community modules (e.g. openssh_keypair in ceph role).
- name: Install Ansible collections
run: ansible-galaxy collection install -r collections/requirements.yml

- name: Yamllint (ansible + utils)
run: yamllint ansible utils

- name: Ansible playbook syntax check
run: |
set -euo pipefail
INV=( -i "localhost," -c local )
VARFILE=( -e "@ansible/group_vars/all.sample.yml" )
check() {
local playbook="$1"
echo "==> ${playbook}"
ansible-playbook "${INV[@]}" --syntax-check "${VARFILE[@]}" "${playbook}"
}
check ansible/main.yml
check ansible/delete-rhoso.yml
check ansible/deploy_external_ceph.yaml
check ansible/provisioning_nodes.yml
check utils/reprovision.yml
20 changes: 20 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# JetBrew: pragmatic defaults so CI catches YAML syntax errors without
# failing on Ansible/Jinja style that is common in operator repos.
extends: default

ignore: |
**/*.j2

rules:
line-length: disable
document-start: disable
comments: disable
truthy: disable
braces: disable
brackets: disable
empty-lines:
max: 3
max-start: 0
max-end: 2
trailing-spaces: disable
new-line-at-end-of-file: disable
7 changes: 7 additions & 0 deletions collections/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# Collections not bundled with ansible-core (install: ansible-galaxy collection install -r collections/requirements.yml)
collections:
- name: community.crypto
version: ">=2.0.0"
- name: ansible.posix
version: ">=1.5.0"
Loading