Install tripleo.repos collection

Story: TRIPLEOCI-559
Depends-On: https://review.opendev.org/c/openstack/tripleo-repos/+/804221
Change-Id: I8527c81204fa49943f348f57974256472a185090
This commit is contained in:
Marios Andreou 2021-05-14 16:20:35 +03:00 committed by Sorin Sbarnea
parent 888edfdf61
commit 7692ff63a2
3 changed files with 15 additions and 2 deletions

View File

@ -18,7 +18,6 @@ test_plugins = /usr/lib/python2.7/site-packages/tripleo-quickstart/test_plugins:
library = /usr/lib/python2.7/site-packages/tripleo-quickstart/library:$VIRTUAL_ENV/usr/local/share/tripleo-quickstart/library:library:$VIRTUAL_ENV/share/ansible/plugins/modules:/usr/share/ansible/plugins/modules
module_utils = $VIRTUAL_ENV/share/ansible/plugins/module_utils:/usr/share/ansible/plugins/module_utils
roles_path = roles:$VIRTUAL_ENV/usr/local/share/tripleo-quickstart/roles:$VIRTUAL_ENV/usr/local/share/ansible/roles:$VIRTUAL_ENV/usr/local/share/opstools-ansible/roles:$VIRTUAL_ENV/share/ansible/roles:$VIRTUAL_ENV/usr/share/ansible/roles:/usr/share/ansible/roles
collections_paths = collections:$VIRTUAL_ENV/share/ansible/collections:/usr/share/ansible/collections
action_plugins = /usr/share/ansible/plugins/action:$VIRTUAL_ENV/share/ansible/plugins/action:$VIRTUAL_ENV/lib/python2.7/site-packages/ara/plugins/actions:$VIRTUAL_ENV/lib/python3.6/site-packages/ara/plugins/actions
[ssh_connection]

View File

@ -267,6 +267,19 @@ bootstrap_ansible_via_rpm(){
fi
}
install_ansible_collections(){
echo "Installing Ansible Collections"
if [[ -d ../tripleo-repos ]]; then
echo "Installing tripleo.repos from local clone"
# Replace with single step install once we have ansible>=2.10
ansible-galaxy collection build ../tripleo-repos
ansible-galaxy collection install -f ./tripleo-repos-*.tar.gz
rm ./tripleo-repos-*.tar.gz
else
ansible-galaxy collection install -v "tripleo.repos:>=0.0.4"
fi
}
# This enables a user to install rpm dependencies directly
# from this script.

View File

@ -167,6 +167,8 @@ bootstrap () {
popd
fi
popd
install_ansible_collections
}
activate_venv() {
@ -529,7 +531,6 @@ activate_venv
export ANSIBLE_CONFIG=$OOOQ_DIR/ansible.cfg
export ANSIBLE_INVENTORY=$OPT_WORKDIR/hosts
export ANSIBLE_COLLECTIONS_PATHS="$OPT_WORKDIR/share/ansible/collections:~/.ansible/collections:/usr/share/ansible/collections"
export ARA_DATABASE="sqlite:///${OPT_WORKDIR}/ara.sqlite"
#set the ansible ssh.config options if not already set.