- name: Grab OpenStack cloud config from clouds.yaml os_client_config: - name: Get list of needed image formats set_fact: image_formats: "{{ openstack.clouds|json_query('[*].image_format') | unique }}"