Skip to content

Commit 5a4047c

Browse files
authored
Merge pull request #279 from Rendanic/prtools
install_collection.sh: Development tool for easier working on ansible…
2 parents 099f92d + 317a040 commit 5a4047c

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
minor_changes:
3+
- Development helper install_collection.sh (#279)

tools/dev/install_collection.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
#
3+
# Install the ansible-oracle collection from current source
4+
#
5+
set -eu
6+
WORKTDIR="$(dirname ${BASH_SOURCE[0]})/../.."
7+
COLLECTION_OUTDIR=/tmp/ansible-oracle-collection
8+
9+
cd "${WORKTDIR}"
10+
echo "Working in $(pwd)"
11+
test -s "${COLLECTION_OUTDIR}" || mkdir "${COLLECTION_OUTDIR}"
12+
13+
COLLECTION_VERSION=$(cat galaxy.yml | grep "^version: " | cut -d" " -f2)
14+
COLLECTION_ARCHIVE="${COLLECTION_OUTDIR}/opitzconsulting-ansible_oracle-${COLLECTION_VERSION}.tar.gz"
15+
echo "COLLECTION_ARCHIVE: ${COLLECTION_ARCHIVE}"
16+
17+
echo "Building Collection"
18+
ansible-galaxy collection build -v --force --output-path "${COLLECTION_OUTDIR}"
19+
20+
echo "Installing Collection"
21+
ansible-galaxy collection install -v --force "${COLLECTION_ARCHIVE}"
22+
23+
echo "Removing Collectionarchiv"
24+
rm -f "${COLLECTION_ARCHIVE}"

0 commit comments

Comments
 (0)