Skip to content

Commit

Permalink
Add ansible-base to requirements
Browse files Browse the repository at this point in the history
Bumps minimum required Ansible to >= 2.10 as well.

The Ansible ecosystem has changed how their versions and packages work
causing the main `ansible` package versions to no longer determine the
version of `ansible-playbook`. Instead, the new `ansible-base` package
is what matters.

Background: https://blog.while-true-do.io/ansible-release-3-0-0/

For example, installing `ansible==2.10.7` would result in
`ansible-playbook==2.10.16` which was confusing.

By adding `ansible-base` to our `requirements.txt`, we'll get more
consistent and predictable version constraints.

Installing `ansible-base==2.10.16` would result in
`ansible-playbook==2.10.16` as you'd expect.
  • Loading branch information
swalkinshaw committed Dec 11, 2021
1 parent 56ec12d commit 4f9c642
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ workflows:
matrix:
parameters:
python-version: ["3.7.8", "2.7"]
ansible-version: ["~=2.9.0", "~=2.8.0"]
ansible-version: ["~=2.10.0"]
- syntax-check-with-requirements-txt:
name: syntax-check-python-<<matrix.python-version>>-requirements-txt
matrix:
Expand Down
4 changes: 2 additions & 2 deletions lib/trellis/plugins/vars/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from ansible.utils.display import Display
display = Display()

version_requirement = '2.8.0'
version_tested_max = '2.10.7'
version_requirement = '2.10.0'
version_tested_max = '2.10.16'
python3_required_version = '2.5.3'

if version_info[0] == 3 and not ge(LooseVersion(__version__), LooseVersion(python3_required_version)):
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ansible>=2.8.0,<3.0
ansible>=2.10.0,<3.0
ansible-base>=2.10,<=2.10.16
passlib

0 comments on commit 4f9c642

Please sign in to comment.