diff options
author | Tim Rozet <trozet@redhat.com> | 2018-07-13 16:22:30 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2018-07-18 12:19:36 -0400 |
commit | a473a19aca3837eeb77adc41523bb1db95b5f47d (patch) | |
tree | 332bb1f9b9a8e9f05d411c1bf8f801194de95563 /lib/ansible/playbooks/post_deploy_undercloud.yml | |
parent | 6b9d8c01be763bbf46048caa08902880367672a7 (diff) |
Add param for ODL password into overcloudrc
Recent changes upstream have removed the default 'admin' ODL password
and now password is randomly generated:
https://review.openstack.org/#/c/578505/
So in OPNFV we now store the password in overcloudrc as
SDN_CONTROLLER_PASSWORD variable.
Also includes minor fixes to unittests.
Change-Id: Iabe7e4f902442c80af99ba1603a3927cf13d0393
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib/ansible/playbooks/post_deploy_undercloud.yml')
-rw-r--r-- | lib/ansible/playbooks/post_deploy_undercloud.yml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/ansible/playbooks/post_deploy_undercloud.yml b/lib/ansible/playbooks/post_deploy_undercloud.yml index 24be1ded..52057dd6 100644 --- a/lib/ansible/playbooks/post_deploy_undercloud.yml +++ b/lib/ansible/playbooks/post_deploy_undercloud.yml @@ -74,6 +74,20 @@ become: yes become_user: stack with_items: "{{ overcloudrc_files }}" + - name: Grab Heat Environment variables + shell: "{{ stackrc }} && openstack stack environment show overcloud -f json" + register: heat_env + become: yes + become_user: stack + - name: Write SDN controller password to overcloudrc for ODL + lineinfile: + line: "export SDN_CONTROLLER_PASSWORD={{(heat_env.stdout|from_json)['parameter_defaults']['OpenDaylightPassword']}}" + regexp: 'SDN_CONTROLLER_PASSWORD' + path: "/home/stack/{{ item }}" + when: sdn == 'opendaylight' + become: yes + become_user: stack + with_items: "{{ overcloudrc_files }}" - name: Register OS Region shell: "{{ overcloudrc }} && openstack endpoint list -c Region -f json" register: region |