The 'ansible' PyPI package installs _all_ collections, which ends up being
~60% the total size of our virtualenv.
Signed-off-by: Zack Cerza <zack@redhat.com>
# It is impossible to upgrade ansible from 2.9 to 2.10 via pip.
# See https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.10.html#known-issues
if [ -f "$VENV/bin/ansible" ]; then
- ansible_version=$($VENV/bin/pip list --format json | python3 -c "import sys; import json; print(list(filter(lambda i: i['name'] == 'ansible', json.loads(sys.stdin.read())))[0]['version'])")
+ ansible_version=$($VENV/bin/ansible --version | head -n1 | sed -e 's/.*\([[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\).*/\1/')
uninstall_ansible=$(./$VENV/bin/python3 -c "from packaging.version import parse; print(parse('$ansible_version') < parse('2.10.0'))")
if [ "$uninstall_ansible" = "True" ]; then
./$VENV/bin/pip uninstall -y ansible
#
# pip-compile --extra=test pyproject.toml
#
-ansible==6.7.0
- # via teuthology (pyproject.toml)
ansible-core==2.13.13
- # via ansible
+ # via teuthology (pyproject.toml)
apache-libcloud==3.8.0
# via teuthology (pyproject.toml)
backports-ssl-match-hostname==3.7.0.1
packages = find:
install_requires =
PyYAML
- ansible==6.7.0 # Later versions don't support python 3.8
+ ansible-core==2.13.13 # 2.14.x requires python >= 3.9
apache-libcloud
backports.ssl-match-hostname
beanstalkc3>=0.4.0