diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:56 +0000 |
commit | d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2 (patch) | |
tree | 794bc3738a00b5e599f06d1f2f6d79048d87ff8e /tools/install-reqs.sh | |
parent | Initial commit. (diff) | |
download | ansible-lint-d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2.tar.xz ansible-lint-d964cec5e6aa807b75c7a4e7cdc5f11e54b2eda2.zip |
Adding upstream version 6.13.1.upstream/6.13.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/install-reqs.sh')
-rwxr-xr-x | tools/install-reqs.sh | 24 |
1 files changed, 24 insertions, 0 deletions
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 |