summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/post-openstack
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/post-openstack')
-rw-r--r--deploy/adapters/ansible/roles/post-openstack/tasks/main.yml17
-rw-r--r--deploy/adapters/ansible/roles/post-openstack/vars/main.yml1
2 files changed, 18 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml b/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml
index d5182c95..63df7260 100644
--- a/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml
@@ -21,3 +21,20 @@
shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_ocata-opnfv2/ansible.log; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible http.yml > /dev/null"
+
+- name: run ansible yml to fetch openrc
+ shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_ocata-opnfv2/ansible.log; \
+ cd /opt/openstack-ansible/playbooks; \
+ openstack-ansible fetch-openrc.yml > /dev/null"
+
+- name: replace internalURL with publicURL in openrc
+ replace:
+ dest: /opt/openrc
+ regexp: "{{internal_vip}}"
+ replace: "{{ public_vip['ip']}}"
+
+- name: change the endpoint type
+ replace:
+ dest: /opt/openrc
+ regexp: "internalURL"
+ replace: "publicURL"
diff --git a/deploy/adapters/ansible/roles/post-openstack/vars/main.yml b/deploy/adapters/ansible/roles/post-openstack/vars/main.yml
index d9c36d42..19d9e225 100644
--- a/deploy/adapters/ansible/roles/post-openstack/vars/main.yml
+++ b/deploy/adapters/ansible/roles/post-openstack/vars/main.yml
@@ -7,6 +7,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
+internal_vip: "10.1.0.22"
flavors:
- id: 0
name: m1.nano