Support setting ansible docker image name from env variable
Change-Id: Ie864f8e12bb9eac02a901d93c870c4679aedba94
Issue-ID: OOM-2625
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
diff --git a/ansible/docker/build_ansible_image.sh b/ansible/docker/build_ansible_image.sh
index 49833be..a0eb775 100755
--- a/ansible/docker/build_ansible_image.sh
+++ b/ansible/docker/build_ansible_image.sh
@@ -24,6 +24,9 @@
ansible_version="$1"
image_name="${2:-ansible:latest}"
+# Override image name from env variable if set
+image_name="${ANSIBLE_CHROOT_IMAGE_NAME:-$image_name}"
+
script_path=$(readlink -f "$0")
script_dir=$(dirname "$script_path")
@@ -47,4 +50,4 @@
exit 1
fi
-exit 0
\ No newline at end of file
+exit 0