summaryrefslogtreecommitdiffstats
path: root/build-gluster-org/scripts
diff options
context:
space:
mode:
authordkhandel <dkhandel@localhost.localdomain>2018-05-28 17:03:49 +0530
committerdkhandel <dkhandel@localhost.localdomain>2018-05-28 17:03:49 +0530
commit5b5a79ee8bbde1e5b7af66980df7b168e22be632 (patch)
tree4c5399cc8934be52c9ecb3d17564356589f9d1c5 /build-gluster-org/scripts
parent661ee3b0bfa8e6a55a8471090b4708608c8db132 (diff)
Replace ansible-playbook builder to command line
Change-Id: I4c26a1667cdbb124aae0fa55058ad9468a1547a0
Diffstat (limited to 'build-gluster-org/scripts')
-rw-r--r--build-gluster-org/scripts/distributed-node-create.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/build-gluster-org/scripts/distributed-node-create.sh b/build-gluster-org/scripts/distributed-node-create.sh
index 02077b9..b364d58 100644
--- a/build-gluster-org/scripts/distributed-node-create.sh
+++ b/build-gluster-org/scripts/distributed-node-create.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+
+MAX_ATTEMPTS = 3
set -e
# create and activate virtual env
@@ -12,5 +14,12 @@ ssh-keygen -f ${WORKSPACE}/key -t rsa -b 4096
pip install pyrax
/opt/qa/distributed-tests/rackspace-server-manager.py create -n ${MACHINES_COUNT}
-#create ansible.cfg to set the private SSH key file path
-echo -e "[defaults]\nprivate_key_file = key" > ansible.cfg
+for retry in `seq 1 $MAX_ATTEMPTS`
+do
+ ansible-playbook -i hosts -e 'host_key_checking=False' --private-key=key /opt/qa/distributed-tests/distributed-server.yml
+ ret=$?
+ if [ $ret -eq 0 ]; then
+ break
+ fi
+ echo 'Attempting to run again...'
+done