ci(molecule): Added collection instalation
diff --git a/molecule/default/tools/install-dependencies b/molecule/default/tools/install-dependencies
index 23fa506..abb0f79 100755
--- a/molecule/default/tools/install-dependencies
+++ b/molecule/default/tools/install-dependencies
@@ -4,3 +4,27 @@
pip install \
--extra-index-url https://vexxhost.github.io/wheels/alpine-3.15/ \
'openstacksdk<0.99.0'
+
+# Generate dynamic `galaxy.yml` file
+python3.9 ./tools/generate-galaxy-yml.py
+
+# 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