Skip to content

Commit

Permalink
OSP - User _member variable for username and password (#2018)
Browse files Browse the repository at this point in the history
* OSP - User _member variable for username and password

* Use d() instead of default()

* Remove osp_project_create check. Use default instead of d.

* Always use osp_auth_username|password_member
  • Loading branch information
fabiendupont authored Jun 23, 2020
1 parent 10903fd commit d742311
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ clouds:
{{ osp_project_name }}:
auth:
auth_url: "{{ osp_auth_url }}"
username: "{{ guid }}-user"
username: "{{ osp_auth_username_member }}"
password: "{{ osp_auth_password_member }}"
project_name: "{{ osp_project_name }}"
project_id: "{{ hostvars['localhost']['osp_project_info'][0].id }}"
project_id: "{{ hostvars['localhost']['osp_project_info'][0].id | default(osp_project_id) }}"
user_domain_name: "Default"
password: "{{ hostvars['localhost']['heat_user_password'] }}"
region_name: "regionOne"
interface: "public"
identity_api_version: 3
identity_api_version: 3
9 changes: 2 additions & 7 deletions ansible/roles/host-ocp4-provisioner/templates/clouds.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@ clouds:
{{ osp_cloud_name }}:
auth:
auth_url: "{{ osp_auth_url }}"
{% if osp_project_create | bool %}
username: "{{ guid }}-user"
password: "{{ hostvars['localhost']['heat_user_password'] }}"
{% else %}
username: "{{ osp_auth_username }}"
password: "{{ osp_auth_password }}"
{% endif %}
username: "{{ osp_auth_username_member }}"
password: "{{ osp_auth_password_member }}"
project_name: "{{ osp_project_name }}"
project_id: "{{ hostvars['localhost']['osp_project_info'][0].id | default(osp_project_id) }}"
user_domain_name: "{{ hostvars['localhost']['osp_auth_user_domain'] | d('Default') }}"
Expand Down

0 comments on commit d742311

Please sign in to comment.