Merge "Always write clouds.yaml"

This commit is contained in:
Jenkins 2017-03-17 08:24:54 +00:00 committed by Gerrit Code Review
commit 36e32ecdc2
6 changed files with 21 additions and 3 deletions

View File

@ -22,7 +22,6 @@
config_project_name: "{{ keystone.bootstrap.project_name }}"
config_region_name: "{{ keystone.bootstrap.region_name }}"
config_auth_url: "{{ keystone.bootstrap.public_url }}"
when: enable_keystone is defined and enable_keystone | bool == true
- { role: bifrost-create-dib-image, dib_imagename: "{{ http_boot_folder }}/ipa", build_ramdisk: false, dib_os_element: "{{ ipa_dib_os_element|default('debian') }}", dib_elements: "ironic-agent {{ ipa_extra_dib_elements | default('') }}", when: create_ipa_image | bool == true }
- { role: bifrost-create-dib-image, dib_imagename: "{{ deploy_image }}", dib_imagetype: "qcow2", dib_elements: "vm enable-serial-console {{ dib_init_element|default('simple-init') }} {{ extra_dib_elements|default('') }}", when: create_image_via_dib | bool == true and transform_boot_image | bool == false }
environment:

View File

@ -1,2 +1,2 @@
---
# This file is intentionally empty
ironic_api_url: "http://localhost:6385"

View File

@ -23,6 +23,7 @@
config_project_domain_id: "{{ config_project_domain_id|default('default') }}"
config_user_domain_id: "{{ config_user_domain_id|default('default') }}"
when:
- "{{ enable_keystone | default(false) | bool }}"
- "{{ clouds is undefined }}"
- "{{ config_username is defined }}"
- "{{ config_password is defined }}"

View File

@ -1,5 +1,6 @@
# WARNING: This file is managed by bifrost.
clouds:
{% if (enable_keystone | default(false) | bool) %}
{% for cloud in clouds | default({}) | dictsort %}
{{ cloud.0 }}:
region_name: {{ cloud.1.config_region_name }}
@ -12,3 +13,9 @@ clouds:
user_domain_id: "{{ cloud.1.config_user_domain_id | default('default') }}"
identity_api_version: "3"
{% endfor %}
{% else %}
bifrost:
auth_type: None
auth: {}
url: {{ ironic_api_url }}
{% endif %}

View File

@ -87,7 +87,6 @@
config_project_name: "baremetal"
config_region_name: "{{ keystone.bootstrap.region_name }}"
config_auth_url: "{{ keystone.bootstrap.public_url }}"
when: "{{ enable_keystone is defined and enable_keystone | bool == true }}"
environment:
http_proxy: "{{ lookup('env','http_proxy') }}"
https_proxy: "{{ lookup('env','https_proxy') }}"

View File

@ -0,0 +1,12 @@
---
features:
- |
bifrost now always writes ``clouds.yaml`` configuration file
for os-client-config independently of whether keystone is installed
or not.
This allows unified usage of ironic-related openstackclient commands
both in presence and absence of installed keystone by using the
``openstack`` command in the following form for both situations::
openstack --os-cloud bifrost baremetal ...