- import_tasks: roothints.yaml
  when: ironic.root_device_hints is defined

- set_fact:
    ironic_root_device: /dev/{{ item.key }}
  loop: "{{ ansible_devices | dict2items | sort(attribute='key') }}"
  when:
    - ironic_root_device is undefined
    - item.value.host

- set_fact:
    ironic_image_target: "{{ ironic_root_device }}"
  when: ironic_image_target is undefined
