1 # Copyright (c) 2017 Intel Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 - name: parse openrc into openstack auth dict
16 parse_shell_file: path="{{ openrc_file }}" fact_name="openrc"
21 yardstick_url_ip: "{{ openrc.OS_AUTH_URL|urlsplit|attr('hostname') }}"
23 - debug: var=yardstick_url_ip
25 # This doesn't work, due to OS_IDENTITY_API_VERSION, use environment
29 auth_url: "{{ openrc.OS_AUTH_URL }}"
30 password: "{{ openrc.OS_PASSWORD }}"
31 username: "{{ openrc.OS_USERNAME }}"
32 project_name: "{{ openrc.OS_PROJECT_NAME }}"
33 # tenant_name: "{{ openrc.OS_TENANT_NAME }}"
34 project_domain_name: "{{ openrc.OS_PROJECT_DOMAIN_NAME }}"
35 # user_domain_name: "{{ openrc.OS_USER_DOMAIN_NAME }}"
36 # BUGS: We need to specify identity_api_version == 3, but we can't do it here
37 # because it is not the write place
38 # we need to set it via OS_IDENTITY_API_VERSION or clouds.yaml
39 # identity_api_version: "{{ openrc.OS_IDENTITY_API_VERSION }}"
46 # must specify API version here
47 identity_api_version: "{{ openrc.OS_IDENTITY_API_VERSION }}"
52 # this is autodetected and used
53 dest: "{{ cloud_yaml_path }}"
54 when: write_cloud_yaml|default(False)