--- - name: Clone repositories when: item.value.build is defined git: dest: /tmp/{{ item.key }} repo: "{{ item.value.build.repository }}" version: "{{ item.value.build.version }}" loop: "{{ omni_compose_apps | dict2items }}" loop_control: label: "{{ item.key }}" - name: Build image when: item.value.build is defined docker_image: source: build name: "{{ item.key }}" tag: "{{ item.value.build.version }}" build: path: /tmp/{{ item.key }} rm: true loop: "{{ omni_compose_apps | dict2items }}" loop_control: label: "{{ item.key }}"