From 9a060b441765f04ac086c07f157abf9d90d9e883 Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Wed, 25 Apr 2018 07:47:35 -0700 Subject: nsb_setup: parametrize docker image The user may need to pull a different image stable or a tagged release version. Since we can't pull a tagged image before it is tagged just give up and make it an argument JIRA: YARDSTICK-1137 Change-Id: I0caf0f8915c191786c7db6d929be2fa350a545af Signed-off-by: Ross Brattain --- nsb_setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'nsb_setup.sh') diff --git a/nsb_setup.sh b/nsb_setup.sh index 50fc017d1..86796c4d4 100755 --- a/nsb_setup.sh +++ b/nsb_setup.sh @@ -67,8 +67,16 @@ pip install ansible==2.4.2 shade==1.22.2 docker-py==1.10.6 ANSIBLE_SCRIPTS="ansible" +if [[ -n ${1} ]]; then + yardstick_docker_image="-e yardstick_docker_image=${1}" +else + yardstick_docker_image="" +fi + +# no quotes for yardstick_docker_image so when empty it is removed as whitespace cd ${ANSIBLE_SCRIPTS} &&\ ansible-playbook \ -e img_property="nsb" \ + ${yardstick_docker_image} \ -e YARD_IMG_ARCH='amd64' ${extra_args}\ -i yardstick-install-inventory.ini nsb_setup.yml -- cgit 1.2.3-korg