Skip to content
Open
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
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ansible==11.13.0
ansible==12.2.0

Check failure on line 1 in requirements.txt

View check run for this annotation

Claude / Claude Code Review

ansible 12.2.0 bump not propagated to ansible-core upper-bound pins (playbooks/ansible_version.yml, meta/runtime.yml, docs)

Bumping ansible from 11.13.0 to 12.2.0 pulls in ansible-core 2.19.x, but three upper-bound pins in the repo still cap at `<2.19.0` and will block every playbook run and collection install. This PR must also bump: `playbooks/ansible_version.yml` (maximal_ansible_version to 2.20.0), `meta/runtime.yml` (requires_ansible upper bound to `<2.20.0`), and the compatibility table in `docs/ansible/ansible.md:35`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Bumping ansible from 11.13.0 to 12.2.0 pulls in ansible-core 2.19.x, but three upper-bound pins in the repo still cap at <2.19.0 and will block every playbook run and collection install. This PR must also bump: playbooks/ansible_version.yml (maximal_ansible_version to 2.20.0), meta/runtime.yml (requires_ansible upper bound to <2.20.0), and the compatibility table in docs/ansible/ansible.md:35.

Extended reasoning...

What breaks

The ansible community package has a fixed mapping to ansible-core:

  • ansible 11.xansible-core 2.18.x
  • ansible 12.xansible-core 2.19.x

So installing ansible==12.2.0 (this PR) will install ansible-core 2.19.x at runtime. Three separate upper-bound pins in the repo still cap at <2.19.0, each with a distinct enforcement path:

1. playbooks/ansible_version.yml:8-17 — playbook runtime assertion

vars:
  minimal_ansible_version: 2.18.0
  maximal_ansible_version: 2.19.0
...
- ansible_version.string is version(minimal_ansible_version, ">=")
- ansible_version.string is version(maximal_ansible_version, "<")

This play is imported by playbooks/boilerplate.yml, which is imported by essentially every user-facing entrypoint (cluster.yml, reset.yml, upgrade-cluster.yml, scale.yml, etc.). Every playbook run will abort at startup with: Ansible must be between 2.18.0 and 2.19.0 exclusive - you have 2.19.x.

2. meta/runtime.yml:2 — collection install/load metadata

requires_ansible: ">=2.18.0,<2.19.0"

galaxy.yml declares this repo as the kubernetes_sigs.kubespray collection, and tests/scripts/collection-build-install.sh and contrib/collection.sh actually build and install it via ansible-galaxy collection install. requires_ansible is enforced by ansible-galaxy at install/load time before any playbook runs, with an error like: Collection kubernetes_sigs.kubespray was created with Ansible version >=2.18.0,<2.19.0, and you are running 2.19.x. This is a different failure path from #1 — a different file, different enforcement mechanism, different error message.

3. docs/ansible/ansible.md:35 — compatibility documentation

The supported-version table still reads >=2.18.0, <2.19.0, which would be inconsistent with an ansible-12 pin.

Step-by-step proof

  1. User (or CI) runs pip install -r requirements.txtansible==12.2.0 installed → ansible-core 2.19.x installed as a transitive dependency.
  2. User runs ansible-playbook -i inventory/... cluster.yml.
  3. cluster.yml imports playbooks/boilerplate.yml, which imports playbooks/ansible_version.yml.
  4. The assert task evaluates ansible_version.string is version("2.19.0", "<") where ansible_version.string == "2.19.x".
  5. Assertion fails → playbook aborts with the "must be between 2.18.0 and 2.19.0 exclusive" message. No cluster operation succeeds.

Parallel path for collection users:

  1. User runs ansible-galaxy collection install kubernetes_sigs.kubespray (or tests/scripts/collection-build-install.sh).
  2. ansible-galaxy reads meta/runtime.yml, sees requires_ansible: ">=2.18.0,<2.19.0", compares against the installed ansible-core 2.19.x.
  3. Install/load is rejected. Playbooks are never reached.

Fix

Bump all three upper bounds in lockstep with this requirements.txt change (e.g. to <2.20.0):

  • playbooks/ansible_version.yml: maximal_ansible_version: 2.20.0
  • meta/runtime.yml: requires_ansible: ">=2.18.0,<2.20.0"
  • docs/ansible/ansible.md:35: update table row to >=2.18.0, <2.20.0

Without these, the PR breaks kubespray for every user on every entrypoint (playbook execution and collection install).

# Needed for community.crypto module
cryptography==46.0.5
# Needed for jinja2 json_query templating
Expand Down