Stop passing ironic_url to ansible modules
The ansible collection team wants to deprecate ironic_url in favour of auth.endpoint. This has been supported for a long time, adjust the no-auth code to use it. This leave os_ironic_node_info, which should be replaced by the upstream baremetal_node_info instead. Change-Id: Icec366a4a5b66e77cc5ee9cf92248be68bd41807
This commit is contained in:
parent
7c9ef4e68e
commit
ba9ddfea6a
@ -49,31 +49,8 @@
|
|||||||
- name: "If in noauth mode and no clouds.yaml, unset authentication parameters."
|
- name: "If in noauth mode and no clouds.yaml, unset authentication parameters."
|
||||||
set_fact:
|
set_fact:
|
||||||
auth_type: None
|
auth_type: None
|
||||||
auth: {}
|
auth:
|
||||||
|
endpoint: "{{ ironic_url | default(ironic_api_url) }}"
|
||||||
when:
|
when:
|
||||||
- auth is undefined
|
- auth is undefined
|
||||||
- noauth_mode | bool
|
- 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"
|
|
||||||
set_fact:
|
|
||||||
ironic_url: "{{ openstack_cloud.baremetal_endpoint_override }}"
|
|
||||||
when:
|
|
||||||
- not ironic_url | default("")
|
|
||||||
- openstack_cloud is defined
|
|
||||||
- openstack_cloud.baremetal_endpoint_override is defined
|
|
||||||
|
|
||||||
- name: "Provide ironic_url for no-auth mode if there is no override"
|
|
||||||
set_fact:
|
|
||||||
ironic_url: "{{ ironic_api_url }}"
|
|
||||||
when:
|
|
||||||
- not ironic_url | default("")
|
|
||||||
- noauth_mode | bool
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
auth_type: "{{ auth_type | default(omit) }}"
|
auth_type: "{{ auth_type | default(omit) }}"
|
||||||
auth: "{{ auth | default(omit) }}"
|
auth: "{{ auth | default(omit) }}"
|
||||||
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
||||||
ironic_url: "{{ ironic_url | default(omit) }}"
|
|
||||||
uuid: "{{ uuid | default() }}"
|
uuid: "{{ uuid | default() }}"
|
||||||
name: "{{ name | default() }}"
|
name: "{{ name | default() }}"
|
||||||
skip_items:
|
skip_items:
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
auth_type: "{{ auth_type | default(omit) }}"
|
auth_type: "{{ auth_type | default(omit) }}"
|
||||||
auth: "{{ auth | default(omit) }}"
|
auth: "{{ auth | default(omit) }}"
|
||||||
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
||||||
ironic_url: "{{ ironic_url | default(omit) }}"
|
|
||||||
uuid: "{{ uuid | default() }}"
|
uuid: "{{ uuid | default() }}"
|
||||||
name: "{{ name | default() }}"
|
name: "{{ name | default() }}"
|
||||||
skip_items:
|
skip_items:
|
||||||
@ -114,7 +113,6 @@
|
|||||||
auth_type: "{{ auth_type | default(omit) }}"
|
auth_type: "{{ auth_type | default(omit) }}"
|
||||||
auth: "{{ auth | default(omit) }}"
|
auth: "{{ auth | default(omit) }}"
|
||||||
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
||||||
ironic_url: "{{ ironic_url | default(omit) }}"
|
|
||||||
uuid: "{{ uuid }}"
|
uuid: "{{ uuid }}"
|
||||||
state: present
|
state: present
|
||||||
# Allow instance_info in the inventory to override configdrive
|
# Allow instance_info in the inventory to override configdrive
|
||||||
|
@ -20,7 +20,8 @@ clouds:
|
|||||||
{% elif noauth_mode | default(false) | bool %}
|
{% elif noauth_mode | default(false) | bool %}
|
||||||
bifrost:
|
bifrost:
|
||||||
auth_type: "none"
|
auth_type: "none"
|
||||||
baremetal_endpoint_override: {{ ironic_api_url }}
|
auth:
|
||||||
|
endpoint: {{ ironic_api_url }}
|
||||||
baremetal_introspection_endpoint_override: {{ ironic_inspector_api_url }}
|
baremetal_introspection_endpoint_override: {{ ironic_inspector_api_url }}
|
||||||
{% if enable_tls | bool %}
|
{% if enable_tls | bool %}
|
||||||
cacert: "{{ tls_certificate_path }}"
|
cacert: "{{ tls_certificate_path }}"
|
||||||
@ -28,6 +29,7 @@ clouds:
|
|||||||
# Deprecated
|
# Deprecated
|
||||||
bifrost-inspector:
|
bifrost-inspector:
|
||||||
auth_type: "none"
|
auth_type: "none"
|
||||||
|
auth:
|
||||||
endpoint: {{ ironic_inspector_api_url }}
|
endpoint: {{ ironic_inspector_api_url }}
|
||||||
{% if enable_tls | bool %}
|
{% if enable_tls | bool %}
|
||||||
cacert: "{{ tls_certificate_path }}"
|
cacert: "{{ tls_certificate_path }}"
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
auth_type: "{{ auth_type | default(omit) }}"
|
auth_type: "{{ auth_type | default(omit) }}"
|
||||||
auth: "{{ auth | default(omit) }}"
|
auth: "{{ auth | default(omit) }}"
|
||||||
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
||||||
ironic_url: "{{ ironic_url | default(omit) }}"
|
|
||||||
uuid: "{{ uuid | default() }}"
|
uuid: "{{ uuid | default() }}"
|
||||||
name: "{{ name | default() }}"
|
name: "{{ name | default() }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
auth_type: "{{ auth_type | default(omit) }}"
|
auth_type: "{{ auth_type | default(omit) }}"
|
||||||
auth: "{{ auth | default(omit) }}"
|
auth: "{{ auth | default(omit) }}"
|
||||||
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
||||||
ironic_url: "{{ ironic_url | default(omit) }}"
|
|
||||||
driver: ""
|
driver: ""
|
||||||
uuid: "{{ uuid | default() }}"
|
uuid: "{{ uuid | default() }}"
|
||||||
name: "{{ name | default() }}"
|
name: "{{ name | default() }}"
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
auth_type: "{{ auth_type | default(omit) }}"
|
auth_type: "{{ auth_type | default(omit) }}"
|
||||||
auth: "{{ auth | default(omit) }}"
|
auth: "{{ auth | default(omit) }}"
|
||||||
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
||||||
ironic_url: "{{ ironic_url | default(omit) }}"
|
|
||||||
driver: "{{ driver }}"
|
driver: "{{ driver }}"
|
||||||
uuid: "{{ uuid | default() }}"
|
uuid: "{{ uuid | default() }}"
|
||||||
name: "{{ name | default() }}"
|
name: "{{ name | default() }}"
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
auth_type: "{{ auth_type | default(omit) }}"
|
auth_type: "{{ auth_type | default(omit) }}"
|
||||||
auth: "{{ auth | default(omit) }}"
|
auth: "{{ auth | default(omit) }}"
|
||||||
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
ca_cert: "{{ tls_certificate_path | default(omit) }}"
|
||||||
ironic_url: "{{ ironic_url | default(omit) }}"
|
|
||||||
uuid: "{{ uuid | default('') }}"
|
uuid: "{{ uuid | default('') }}"
|
||||||
name: "{{ name | default('') }}"
|
name: "{{ name | default('') }}"
|
||||||
timeout: "{{ inspection_wait_timeout }}"
|
timeout: "{{ inspection_wait_timeout }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user