summaryrefslogtreecommitdiffstats
path: root/images/installer/root/usr/local/bin/run
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-10-05 12:41:16 -0400
committerGitHub <noreply@github.com>2017-10-05 12:41:16 -0400
commit8e2019c9c3840a64425c34c23ace9e9cbd6b7eb0 (patch)
tree6574d1a34ee7de7f1c176b4dc1efee02dab9c4e0 /images/installer/root/usr/local/bin/run
parent2dde1853efe73b7b6f185ce918aaaefeac20334c (diff)
parente78792094614261bf65c2c075ab10aeba6459207 (diff)
downloadopenshift-8e2019c9c3840a64425c34c23ace9e9cbd6b7eb0.tar.gz
openshift-8e2019c9c3840a64425c34c23ace9e9cbd6b7eb0.tar.bz2
openshift-8e2019c9c3840a64425c34c23ace9e9cbd6b7eb0.tar.xz
openshift-8e2019c9c3840a64425c34c23ace9e9cbd6b7eb0.zip
Merge pull request #5644 from etsauer/installer-image-directory-support
Adding support for an inventory directory/hybrid inventory
Diffstat (limited to 'images/installer/root/usr/local/bin/run')
-rwxr-xr-ximages/installer/root/usr/local/bin/run5
1 files changed, 4 insertions, 1 deletions
diff --git a/images/installer/root/usr/local/bin/run b/images/installer/root/usr/local/bin/run
index 70aa0bac3..cd38a6ff0 100755
--- a/images/installer/root/usr/local/bin/run
+++ b/images/installer/root/usr/local/bin/run
@@ -19,6 +19,9 @@ if [[ -v INVENTORY_FILE ]]; then
# Make a copy so that ALLOW_ANSIBLE_CONNECTION_LOCAL below
# does not attempt to modify the original
cp -a ${INVENTORY_FILE} ${INVENTORY}
+elif [[ -v INVENTORY_DIR ]]; then
+ INVENTORY="$(mktemp -d)"
+ cp -R ${INVENTORY_DIR}/* ${INVENTORY}
elif [[ -v INVENTORY_URL ]]; then
curl -o ${INVENTORY} ${INVENTORY_URL}
elif [[ -v DYNAMIC_SCRIPT_URL ]]; then
@@ -29,7 +32,7 @@ elif [[ -v GENERATE_INVENTORY ]]; then
/usr/local/bin/generate ${INVENTORY}
else
echo
- echo "One of INVENTORY_FILE, INVENTORY_URL, GENERATE_INVENTORY, or DYNAMIC_SCRIPT_URL must be provided."
+ echo "One of INVENTORY_FILE, INVENTORY_DIR, INVENTORY_URL, GENERATE_INVENTORY, or DYNAMIC_SCRIPT_URL must be provided."
exec /usr/local/bin/usage
fi
INVENTORY_ARG="-i ${INVENTORY}"