From bc203433f1120373fbe751521eafc6cd3a3ee336 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Mon, 25 Sep 2023 14:03:34 +0000 Subject: Add support for ansible-core Collections version taken from official Ansible 7 package [1] and limited to the same major version. [1]: https://github.com/ansible-community/ansible-build-data/blob/main/7/ansible-7.7.0.yaml Change-Id: I0f1ea9717397adc2d2c3215d74ec3759f351a57a --- tools/kolla-ansible | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/kolla-ansible b/tools/kolla-ansible index 0fa247da2..07b43cf6c 100755 --- a/tools/kolla-ansible +++ b/tools/kolla-ansible @@ -130,7 +130,13 @@ function find_base_dir { function install_deps { echo "Installing Ansible Galaxy dependencies" - ansible-galaxy collection install -r ${BASEDIR}/requirements.yml --force + if pip show ansible 2>/dev/null; then + ansible-galaxy collection install -r ${BASEDIR}/requirements.yml --force + else + ansible-galaxy collection install -r ${BASEDIR}/requirements.yml --force + ansible-galaxy collection install -r ${BASEDIR}/requirements-core.yml --force + fi + if [[ $? -ne 0 ]]; then echo "ERROR: Failed to install Ansible Galaxy dependencies" >&2 exit 1 -- cgit v1.2.3