]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Drop ansible for ansible-core
authorZack Cerza <zack@redhat.com>
Tue, 2 Jan 2024 18:16:15 +0000 (11:16 -0700)
committerZack Cerza <zack@redhat.com>
Wed, 3 Jan 2024 22:06:57 +0000 (15:06 -0700)
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>
bootstrap
requirements.txt
setup.cfg

index 2906af8819b26fb1ce591ebff82c94cdd41fe7c8..96e87f1f2d0b0639da0208994771c4bf3b9a006b 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -201,7 +201,7 @@ fi
 # 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
index d42e52d2f4735a62b74c47da72088aadfcec818c..95eb3a9949199df0bd00f8682181d9433d66b90c 100644 (file)
@@ -4,10 +4,8 @@
 #
 #    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
index 6118586a693fde34e74d87c6f7fd92606969be3f..be35d5ebddece015178f1a6b752e87b3ab872b69 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -31,7 +31,7 @@ python_requires = >=3.8
 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