dynamic: always use clouds.yaml when it is available

Currently it is ignored when noauth_mode is true (the default).

Change-Id: Ia94ee8a635629f4311dcde611d0e69a2b7c444a9
This commit is contained in:
Dmitry Tantsur 2020-08-19 10:35:13 +02:00
parent bcda97b630
commit d203955c28

View File

@ -11,12 +11,6 @@
# limitations under the License.
---
- name: "If in noauth mode, unset authentication parameters."
set_fact:
auth_type: None
auth: {}
when: noauth_mode | bool
- name: "Execute openstack.cloud.config to collect facts"
openstack.cloud.config:
no_log: yes
@ -44,6 +38,21 @@
- openstack_cloud is defined
no_log: yes
- name: "If in noauth mode and no clouds.yaml, unset authentication parameters."
set_fact:
auth_type: None
auth: {}
when:
- auth is undefined
- noauth_mode | bool
# FIXME(dtantsur): the ironic modules hardcode None and "None" as valid values,
# while "none" does not trigger handling of ironic_url.
- name: "Work around a bug in the ansible modules."
set_fact:
auth_type: None
when: auth_type == 'none'
# FIXME(dtantsur): this should work by simply passing the cloud to ansible
# modules, but it does not because of some issues there.
- name: "Provide ironic_url if there is an endpoint override"