# show all available Openstack images

- name: Retrieve all available Openstack images
  os_image_facts:

- name: Get image names and Ids
  set_fact:
    image_facts: "{{ image_facts|default([]) + [ {'name': item.name, 'id': item.id} ] }}"
    loop: '{{ openstack_image }}'
    when: item.name is defined

- name: Show images
  debug:
    msg: "Image name: {{ item.name }}; Image id: {{ item.id }}"
  loop: '{{ image_facts }}'
  