From f902e750a3af4897a7c7c8ce35897ca1e9decb14 Mon Sep 17 00:00:00 2001 From: "juraj.linkes" Date: Fri, 17 Mar 2017 13:48:08 +0100 Subject: Fixed flavor and image configuration in post_apex.sh Now also removes hostname from known_hosts Change-Id: Ie8446637dc8fb61a5930c8397bbd42d9a4d3805f Signed-off-by: juraj.linkes --- scripts/post_apex.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/post_apex.sh b/scripts/post_apex.sh index 70ec4d6..56caccd 100755 --- a/scripts/post_apex.sh +++ b/scripts/post_apex.sh @@ -32,10 +32,12 @@ do node_fields=`echo $node | cut -d "|" -f 3,7` node_name=`echo $node_fields | cut -d "|" -f 1` node_ip=`echo $node_fields | cut -d "=" -f 2` - echo "adding $node_name to /etc/hosts" + echo "Adding $node_name to /etc/hosts" echo $node_ip $node_name >> /etc/hosts - echo "removing $node_ip from known hosts" + echo "Removing $node_ip from known hosts" sed -i "/$node_ip/d" /root/.ssh/known_hosts + echo "Removing $node_name from known hosts" + sed -i "/$node_name/d" /root/.ssh/known_hosts echo "Setting up ssh keys on $node_name for root" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null stack@$undercloud_ip "/home/stack/copy_keys.sh $node_ip &" 2> /dev/null echo "Copying overcloudrc to $node_name" @@ -57,8 +59,8 @@ do fi done . $overcloudrc_path -openstack flavor list | grep nfv > /dev/null echo +openstack flavor list | grep nfv > /dev/null if [[ ! $? -eq 0 ]] then echo "Configuring flavor nfv" @@ -67,8 +69,8 @@ else echo "Flavor nfv is already configured" fi -openstack image list | grep cirros-0.3.4 > /dev/null echo +openstack image list | grep cirros-0.3.4 > /dev/null if [[ ! $? -eq 0 ]] then echo "Configuring image cirros-0.3.4" -- cgit 1.2.3-korg