From 0c221bb4dc1b94660f04958e380819c535307565 Mon Sep 17 00:00:00 2001 From: "juraj.linkes" Date: Tue, 17 Oct 2017 08:46:18 +0200 Subject: Added vim installation to post apex script Change-Id: I96fb1d7f9f7fd58c89be53a1a34ba94a857b7e30 Signed-off-by: juraj.linkes --- scripts/post_apex.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/post_apex.sh b/scripts/post_apex.sh index d38ddd4..fb84d43 100755 --- a/scripts/post_apex.sh +++ b/scripts/post_apex.sh @@ -56,9 +56,15 @@ do echo "Copying overcloudrc to $node_name" scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $overcloudrc_path heat-admin@$node_ip:. &> /dev/null ssh -oStrictHostKeyChecking=no heat-admin@$node_ip 'sudo cp /home/heat-admin/overcloudrc /root' &> /dev/null - echo "Cloning fds repo on $node_name to $overcloud_fds_repo_loc" - ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $node_name \ - 'git clone https://gerrit.opnfv.org/gerrit/p/fds.git $overcloud_fds_repo_loc' &> /dev/null + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $node_name ping -c 3 8.8.8.8 > /dev/null + if [[ $? -eq 0 ]] + then + echo "Cloning fds repo on $node_name to $overcloud_fds_repo_loc" + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $node_name \ + 'git clone https://gerrit.opnfv.org/gerrit/p/fds.git $overcloud_fds_repo_loc' &> /dev/null + echo "Installing vim on $node_name" + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $node_name yum -y install vim &> /dev/null + fi if [[ $(ssh -oStrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$node_ip \ 'grep -c ". /root/overcloudrc" /root/.bashrc' 2> /dev/null) -eq 0 ]] then -- cgit 1.2.3-korg