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('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|default(openrc.OS_TENANT_NAME) }}"
33 project_domain_name: "{{ openrc.OS_PROJECT_DOMAIN_NAME }}"
40 # must specify API version here
41 identity_api_version: "{{ openrc.OS_IDENTITY_API_VERSION|default(3) }}"
46 # this is autodetected and used
47 dest: "{{ cloud_yaml_path }}"
48 when: write_cloud_yaml|default(False)