summaryrefslogtreecommitdiffstats
path: root/lib/ansible/playbooks/post_deploy_undercloud.yml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/playbooks/post_deploy_undercloud.yml')
-rw-r--r--lib/ansible/playbooks/post_deploy_undercloud.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/ansible/playbooks/post_deploy_undercloud.yml b/lib/ansible/playbooks/post_deploy_undercloud.yml
index 2e1bf0f3..a8f1cd55 100644
--- a/lib/ansible/playbooks/post_deploy_undercloud.yml
+++ b/lib/ansible/playbooks/post_deploy_undercloud.yml
@@ -77,6 +77,21 @@
with_items:
- overcloudrc
- overcloudrc.v3
+ - name: Register OS Region
+ shell: "{{ overcloudrc }} && openstack endpoint list -c Region -f json"
+ register: region
+ become: yes
+ become_user: stack
+ - name: Write Region into overcloudrc
+ lineinfile:
+ line: "export OS_REGION_NAME={{(region.stdout|from_json)[1]['Region']}}"
+ regexp: 'OS_REGION_NAME'
+ path: "/home/stack/{{ item }}"
+ become: yes
+ become_user: stack
+ with_items:
+ - overcloudrc
+ - overcloudrc.v3
- name: Undercloud NAT - MASQUERADE interface
iptables:
table: nat