diff options
author | juraj.linkes <jlinkes@cisco.com> | 2017-03-17 13:48:08 +0100 |
---|---|---|
committer | juraj.linkes <jlinkes@cisco.com> | 2017-03-17 13:48:08 +0100 |
commit | f902e750a3af4897a7c7c8ce35897ca1e9decb14 (patch) | |
tree | e091ea1d109f66e66612a1d5e903d8d7ad711524 | |
parent | c11c0660c51dab7450a776cbb63381ad74cfacad (diff) |
Fixed flavor and image configuration in post_apex.sh
Now also removes hostname from known_hosts
Change-Id: Ie8446637dc8fb61a5930c8397bbd42d9a4d3805f
Signed-off-by: juraj.linkes <jlinkes@cisco.com>
-rwxr-xr-x | scripts/post_apex.sh | 10 |
1 files 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" |