post-deploy: add public-openrc.sh
Change-Id: Ia19a00afc4bd1f79a463c0aa14585e8047dd47f9
This commit is contained in:
parent
065d61f329
commit
4add26f738
@ -32,6 +32,15 @@
|
||||
group: "{{ ansible_facts.user_gid }}"
|
||||
mode: 0600
|
||||
|
||||
- name: Template out public-openrc.sh
|
||||
become: true
|
||||
template:
|
||||
src: "roles/common/templates/public-openrc.sh.j2"
|
||||
dest: "{{ node_config }}/public-openrc.sh"
|
||||
owner: "{{ ansible_facts.user_uid }}"
|
||||
group: "{{ ansible_facts.user_gid }}"
|
||||
mode: 0600
|
||||
|
||||
- import_role:
|
||||
name: octavia
|
||||
tasks_from: openrc.yml
|
||||
|
17
ansible/roles/common/templates/public-openrc.sh.j2
Normal file
17
ansible/roles/common/templates/public-openrc.sh.j2
Normal file
@ -0,0 +1,17 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
# Clear any old environment that may conflict.
|
||||
for key in $( set | awk '{FS="="} /^OS_/ {print $1}' ); do unset $key ; done
|
||||
export OS_PROJECT_DOMAIN_NAME=Default
|
||||
export OS_USER_DOMAIN_NAME=Default
|
||||
export OS_PROJECT_NAME={{ keystone_admin_project }}
|
||||
export OS_TENANT_NAME={{ keystone_admin_project }}
|
||||
export OS_USERNAME={{ keystone_admin_user }}
|
||||
export OS_PASSWORD={{ keystone_admin_password }}
|
||||
export OS_AUTH_URL={{ keystone_public_url }}
|
||||
export OS_IDENTITY_API_VERSION=3
|
||||
export OS_REGION_NAME={{ openstack_region_name }}
|
||||
export OS_AUTH_PLUGIN=password
|
||||
{% if kolla_admin_openrc_cacert is not none and kolla_admin_openrc_cacert | length > 0 %}
|
||||
export OS_CACERT={{ kolla_admin_openrc_cacert }}
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user