Closed oveits closed 6 years ago
The problem is caused by the line
# file: 2_install_openshift_via_ansible.sh
...
MASTERIP=`cat ./terraform.tfstate | grep public_ip | awk -F '"' '{print $4; exit}'`
returning true
instead of an IP address.
We will see, why:
$ cat ./terraform.tfstate | grep public_ip
"associate_public_ip_address": "true",
"public_ip": "35.156.2.76",
"associate_public_ip_address": "true",
"public_ip": "35.156.161.11",
"associate_public_ip_address": "true",
"public_ip": "35.156.161.17",
"map_public_ip_on_launch": "true",
I need to make sure that I only get the value of public_ip
, but not the value of associate_public_ip_address
.
This is better:
cat ./terraform.tfstate | grep '"public_ip"'
Trying:
$ MASTERIP=`cat ./terraform.tfstate | grep '"public_ip"' | awk -F '"' '{print $4; exit}'`
$ echo $MASTERIP
35.156.2.76
Perfect!
We can see that 2_docker...sh runs fine until the ansible-playbook finisches (
failed=0
). However, after that an ssh command seems to fail.Log: