diff --git a/ansible/roles/ipa-images/tasks/set-driver-info.yml b/ansible/roles/ipa-images/tasks/set-driver-info.yml index f6d937832..4592da109 100644 --- a/ansible/roles/ipa-images/tasks/set-driver-info.yml +++ b/ansible/roles/ipa-images/tasks/set-driver-info.yml @@ -20,12 +20,19 @@ set_fact: ipa_images_ramdisk_uuid: "{{ ipa_images_glance.results[1].images[0].id }}" +- name: Change system scope to all for Ironic operations + set_fact: + ipa_images_ironic_openstack_auth_env: "{{ ipa_images_openstack_auth_env | + combine ({ 'OS_PROJECT_NAME': omit }) | + combine ({ 'OS_PROJECT_DOMAIN_NAME': omit }) | + combine ({ 'OS_SYSTEM_SCOPE': 'all' }) }}" + - name: Get a list of ironic nodes command: | {{ ipa_images_venv }}/bin/openstack baremetal node list --fields name uuid driver_info -f json register: ipa_images_ironic_node_list changed_when: False - environment: "{{ ipa_images_openstack_auth_env }}" + environment: "{{ ipa_images_ironic_openstack_auth_env }}" - name: Make sure openstack nodes are in baremetal-compute group add_host: @@ -59,4 +66,4 @@ when: item["Driver Info"].deploy_kernel != ipa_images_kernel_uuid or item["Driver Info"].deploy_ramdisk != ipa_images_ramdisk_uuid - environment: "{{ ipa_images_openstack_auth_env }}" + environment: "{{ ipa_images_ironic_openstack_auth_env }}" diff --git a/releasenotes/notes/bug-2083014-set-driver-info-86ff04d3d32cdb8c.yaml b/releasenotes/notes/bug-2083014-set-driver-info-86ff04d3d32cdb8c.yaml new file mode 100644 index 000000000..9bc5bbab1 --- /dev/null +++ b/releasenotes/notes/bug-2083014-set-driver-info-86ff04d3d32cdb8c.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixes an issue where task 'ensure ironic nodes use the new Ironic + Python Agent (IPA) images` fails with 'dict object' has no + attribute 'deploy_kernel'. + `__.