'fuel --env $env_id' fails because a variable in single quotes
is not read, it is treated as a literal string.
When using double quotes, the variable is replaced by
its value
Change-Id: I39e777ec27c547e012d6f4674bc24e20d421889c
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
# Check if controller is alive (online='True')
controller_ip=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \
- 'fuel node --env ${env_id} | grep controller | grep "True\| 1" | awk -F\| "{print \$5}" | tail -1' | \
+ "fuel node --env ${env_id} | grep controller | grep 'True\| 1' | awk -F\| '{print \$5}' | head -1" | \
sed 's/ //g') &> /dev/null
if [ -z $controller_ip ]; then