# All three are marked no_log because auth info from clouds.yaml is being # extracted and passed around - name: Check for existing images os_image_facts: cloud: "{{ item.name }}" region_name: "{{ item.region_name }}" image: "three-minute-demo-image" with_items: "{{ openstack.clouds }}" no_log: true register: image_records - name: Get list of clouds without image set_fact: clouds_without_image: "{{ image_records.results|json_query('[?ansible_facts.openstack_image==null].item') }}" no_log: true - name: Upload image if it's not there os_image: cloud: "{{ item.name }}" region_name: "{{ item.region_name }}" name: "three-minute-demo-image" filename: "{{ distro }}.{{ item.image_format }}" no_log: true with_items: "{{ clouds_without_image }}"