Prompt file imported from ayresfonseca/ansible-runner (
.github/prompts/upgrade-ansible.prompt.md). Fill in{{arguments}}before use. Copyright stays with the author.
Upgrade the ansible-core upper-bound constraint in the ansible-runner image to <{{arguments}}.
Steps
-
In pyproject.toml, update the
ansible-coreversion constraint under[tool.poetry.dependencies]:ansible-core = "<{{arguments}}" -
Run
poetry lockto resolve and regenerate poetry.lock:poetry lock -
Build the Docker image to verify the new
ansible-coreversion installs and all collections remain compatible:docker build -t ansible-runner-test . -
Confirm the installed Ansible version inside the image:
docker run --rm ansible-runner-test ansible --version -
Confirm all collections still load without errors:
docker run --rm ansible-runner-test ansible-galaxy collection list -
If any step fails (build error, collection conflict, import error), stop and report the failure with the full error output. Do not proceed.
After Verification
Print this checklist:
## Checklist for ansible-core <{{arguments}}
- [ ] Review the diff: `git diff pyproject.toml poetry.lock`
- [ ] Confirm ansible --version output matches expectations
- [ ] Commit: `git commit -am "chore: upgrade ansible-core to <{{arguments}}"`
- [ ] Push, then bump the version with /bump-version and create a GitHub Release to publish the image
The current constraint is
<2.21. Do not set the upper bound lower than the currently resolved version — checkpoetry.lockfor the installed version before committing.