blob: 4d5fa6d44b09397f52e4dfad555652279f520a43 [file] [log] [blame]
#!/bin/sh -e
# Install OpenStack SDK
pip install \
--extra-index-url https://vexxhost.github.io/wheels/alpine-3.15/ \
netaddr \
'openstacksdk<0.99.0'
# Get the path for the collection
COLLECTION_PATH="${HOME}/.ansible/collections/ansible_collections/vexxhost/atmosphere"
# Clean-up old soft link to allow successful installation
if [ -L "${COLLECTION_PATH}" ] && [ -d "${COLLECTION_PATH}" ]; then
echo "Deleting old soft link to allow successful installation"
rm ${COLLECTION_PATH}
fi
# Install Atmosphere collection
ansible-galaxy collection install .
# Switch to symbolic link after installation
if [ ! -L "${COLLECTION_PATH}" ] && [ -d "${COLLECTION_PATH}" ]; then
echo "Deleting installed collection and adding soft link instead."
rm -rf ${COLLECTION_PATH}
ln -s . ${COLLECTION_PATH}
fi