From d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 18:04:56 +0200 Subject: Adding upstream version 6.13.1. Signed-off-by: Daniel Baumann --- tools/install-reqs.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 tools/install-reqs.sh (limited to 'tools/install-reqs.sh') diff --git a/tools/install-reqs.sh b/tools/install-reqs.sh new file mode 100755 index 0000000..d4f3624 --- /dev/null +++ b/tools/install-reqs.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -euo pipefail +pushd examples/playbooks/collections >/dev/null +MISSING=() +export ANSIBLE_COLLECTIONS_PATH=. +for COLLECTION in ansible.posix community.general community.molecule; +do + COL_NAME=${COLLECTION//\./-} + FILENAME=$(find . -maxdepth 1 -name "$COL_NAME*" -print -quit) + if test -n "$FILENAME" + then + echo "Already cached $COL_NAME as $FILENAME" + else + MISSING+=("${COLLECTION}") + fi + if [ ${#MISSING[@]} -ne 0 ]; then + ansible-galaxy collection download -p . -v "${MISSING[@]}" + fi +done + +echo "Install requirements.yml ..." +ansible-galaxy collection install *.tar.gz -p . +ansible-galaxy collection list +popd >/dev/null -- cgit v1.2.3