#!/bin/bash
IP_host_first="192.168.4."
pwd_path="/home/qa-deploy-utils/qa_shell_script"
config_server="$pwd_path/config_server"
project_path=`cat $config_server/get_env_ip.sh`




for ip_last_num in $project_path
    do
        expect -c "
	        set timeout 10
	        spawn ssh root@${IP_host_first}${ip_last_num}
	        expect \"]#\"
	        send \"sh /home/qa-deploy-utils/qa_shell_script/rabbitmq/initial_mq.sh\r\"
	        set timeout -1
		    expect \"]#\"
		    send \"exit\r\"
	     expect eof;"
    done
