diff options
author | blsaws <bryan.sullivan@att.com> | 2016-09-21 18:51:46 -0700 |
---|---|---|
committer | blsaws <bryan.sullivan@att.com> | 2016-09-21 18:51:46 -0700 |
commit | 3d838c926f9d38d1f9b6d9ab533fd3ae02ee8372 (patch) | |
tree | 72e7d66a72fcc19ccb3926672ac4653b537534b8 /tests/vLamp_Ansible.sh | |
parent | bf95e9ce51288cea9acb461535c9ffbf5c14092b (diff) |
Efforts to address SSH connection issues
JIRA: MODELS-23
Change-Id: I1a230815e232c4cb5b50463d2be06cfb0227ea36
Signed-off-by: blsaws <bryan.sullivan@att.com>
Diffstat (limited to 'tests/vLamp_Ansible.sh')
-rw-r--r-- | tests/vLamp_Ansible.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/vLamp_Ansible.sh b/tests/vLamp_Ansible.sh index 1a1ca59..38efaa5 100644 --- a/tests/vLamp_Ansible.sh +++ b/tests/vLamp_Ansible.sh @@ -119,7 +119,7 @@ app_env: { image_name: "xenial-server", region_name: "RegionOne", private_net_name: "internal", - public_net_name: "$FLOATING_NETWORK_ID", + public_net_name: "$FLOATING_NETWORK_NAME", flavor_name: "m1.small", public_key_file: "/tmp/ansible/ansible.pub", stack_size: 4, @@ -130,6 +130,9 @@ app_env: { } EOF + echo "$0: Setup ubuntu as ansible_user (fix for SSH connection issues?)" + echo "ansible_user: ubuntu" >>/tmp/ansible/blueprints/lampstack/group_vars/all.yml + echo "$0: Setup ubuntu-xenial glance image if needed" if [[ -z $(openstack image list | awk "/ xenial-server / { print \$2 }") ]]; then glance --os-image-api-version 1 image-create --name xenial-server --disk-format qcow2 --location https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img --container-format bare; fi @@ -155,15 +158,19 @@ EOF start() { echo "$0: Add ssh key" + chown root /tmp/ansible/ansible.pem eval $(ssh-agent -s) ssh-add /tmp/ansible/ansible.pem echo "$0: setup OpenStack environment" source /tmp/ansible/admin-openrc.sh + echo "$0: Clear known hosts (workaround for ssh connection issues)" + rm ~/.ssh/known_hosts + echo "$0: invoke blueprint install via Ansible" cd /tmp/ansible/blueprints/lampstack - ansible-playbook -e "action=apply env=opnfv password=$OS_PASSWORD" site.yml + ansible-playbook -vvv -e "action=apply env=opnfv password=$OS_PASSWORD" -u ubuntu site.yml pass } @@ -178,7 +185,7 @@ stop() { echo "$0: invoke blueprint destroy via Ansible" cd /tmp/ansible/blueprints/lampstack - ansible-playbook -e "action=destroy env=opnfv password=$OS_PASSWORD" site.yml + ansible-playbook -vvv -e "action=destroy env=opnfv password=$OS_PASSWORD" -u ubuntu site.yml pass } |