Fix the expect script for ambari-server and force rewriting of /etc/hosts file