diff options
author | Tim Rozet <trozet@redhat.com> | 2018-03-12 11:56:11 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2018-03-12 11:56:11 -0400 |
commit | 560883c38365028abb082c35d335e00fb7adfa97 (patch) | |
tree | 1632cf13c121d8c69fc291e62bac446dff223235 /lib | |
parent | 484b7f421f8c520e45aa8cf9d9d9304132a79b4a (diff) |
Adds OS_REGION_NAME into overcloudrc files
Although this is not required to be able to access overcloud, it is
required by some tests in Functest.
JIRA: APEX-570
Change-Id: I45deaa8061f1be44ce80eed4810537eaf6841803
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/playbooks/post_deploy_undercloud.yml | 15 |
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 |