diff --git a/playbooks/roles/bifrost-cloud-config/tasks/main.yml b/playbooks/roles/bifrost-cloud-config/tasks/main.yml index 302a1dc5f..1973c7745 100644 --- a/playbooks/roles/bifrost-cloud-config/tasks/main.yml +++ b/playbooks/roles/bifrost-cloud-config/tasks/main.yml @@ -49,31 +49,8 @@ - name: "If in noauth mode and no clouds.yaml, unset authentication parameters." set_fact: auth_type: None - auth: {} + auth: + endpoint: "{{ ironic_url | default(ironic_api_url) }}" 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" - 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 diff --git a/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml b/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml index 5ae5749b0..a89528463 100644 --- a/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml @@ -24,7 +24,6 @@ auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" ca_cert: "{{ tls_certificate_path | default(omit) }}" - ironic_url: "{{ ironic_url | default(omit) }}" uuid: "{{ uuid | default() }}" name: "{{ name | default() }}" skip_items: diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml index c00edff63..25a8b93fb 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml @@ -30,7 +30,6 @@ auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" ca_cert: "{{ tls_certificate_path | default(omit) }}" - ironic_url: "{{ ironic_url | default(omit) }}" uuid: "{{ uuid | default() }}" name: "{{ name | default() }}" skip_items: @@ -114,7 +113,6 @@ auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" ca_cert: "{{ tls_certificate_path | default(omit) }}" - ironic_url: "{{ ironic_url | default(omit) }}" uuid: "{{ uuid }}" state: present # Allow instance_info in the inventory to override configdrive diff --git a/playbooks/roles/bifrost-keystone-client-config/templates/clouds.yaml.j2 b/playbooks/roles/bifrost-keystone-client-config/templates/clouds.yaml.j2 index 9ba05517b..bc03ba991 100644 --- a/playbooks/roles/bifrost-keystone-client-config/templates/clouds.yaml.j2 +++ b/playbooks/roles/bifrost-keystone-client-config/templates/clouds.yaml.j2 @@ -20,7 +20,8 @@ clouds: {% elif noauth_mode | default(false) | bool %} bifrost: auth_type: "none" - baremetal_endpoint_override: {{ ironic_api_url }} + auth: + endpoint: {{ ironic_api_url }} baremetal_introspection_endpoint_override: {{ ironic_inspector_api_url }} {% if enable_tls | bool %} cacert: "{{ tls_certificate_path }}" @@ -28,7 +29,8 @@ clouds: # Deprecated bifrost-inspector: auth_type: "none" - endpoint: {{ ironic_inspector_api_url }} + auth: + endpoint: {{ ironic_inspector_api_url }} {% if enable_tls | bool %} cacert: "{{ tls_certificate_path }}" {% endif %} diff --git a/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml b/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml index 77b51f3bc..ff8e50584 100644 --- a/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-unprovision-node-dynamic/tasks/main.yml @@ -21,7 +21,6 @@ auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" ca_cert: "{{ tls_certificate_path | default(omit) }}" - ironic_url: "{{ ironic_url | default(omit) }}" uuid: "{{ uuid | default() }}" name: "{{ name | default() }}" state: absent diff --git a/playbooks/roles/ironic-delete-dynamic/tasks/main.yml b/playbooks/roles/ironic-delete-dynamic/tasks/main.yml index a7430c3c7..ead5424b8 100644 --- a/playbooks/roles/ironic-delete-dynamic/tasks/main.yml +++ b/playbooks/roles/ironic-delete-dynamic/tasks/main.yml @@ -21,7 +21,6 @@ auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" ca_cert: "{{ tls_certificate_path | default(omit) }}" - ironic_url: "{{ ironic_url | default(omit) }}" driver: "" uuid: "{{ uuid | default() }}" name: "{{ name | default() }}" diff --git a/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml b/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml index 40d618f16..95b32c1dc 100644 --- a/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml +++ b/playbooks/roles/ironic-enroll-dynamic/tasks/main.yml @@ -25,7 +25,6 @@ auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" ca_cert: "{{ tls_certificate_path | default(omit) }}" - ironic_url: "{{ ironic_url | default(omit) }}" driver: "{{ driver }}" uuid: "{{ uuid | default() }}" name: "{{ name | default() }}" diff --git a/playbooks/roles/ironic-inspect-node/tasks/main.yml b/playbooks/roles/ironic-inspect-node/tasks/main.yml index e8d2a5ef0..90012d76e 100644 --- a/playbooks/roles/ironic-inspect-node/tasks/main.yml +++ b/playbooks/roles/ironic-inspect-node/tasks/main.yml @@ -50,7 +50,6 @@ auth_type: "{{ auth_type | default(omit) }}" auth: "{{ auth | default(omit) }}" ca_cert: "{{ tls_certificate_path | default(omit) }}" - ironic_url: "{{ ironic_url | default(omit) }}" uuid: "{{ uuid | default('') }}" name: "{{ name | default('') }}" timeout: "{{ inspection_wait_timeout }}"