| --extra-index-url https://vexxhost.github.io/wheels/alpine-3.15/ \ |
| # 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" |
| # 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} |