Add task to delete and reclone local repos on error
This commit is contained in:
parent
94e56ef57c
commit
ed8a2f822a
@ -1,14 +1,35 @@
|
||||
---
|
||||
- name: Clone repositories
|
||||
when: item.value.build is defined
|
||||
git:
|
||||
repo: "{{ item.value.build.repository }}"
|
||||
dest: /tmp/{{ item.key }}
|
||||
version: "{{ item.value.build.version }}"
|
||||
accept_hostkey: true
|
||||
loop: "{{ omni_compose_apps | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
- name: Download source
|
||||
block:
|
||||
- name: Clone repositories
|
||||
when: item.value.build is defined
|
||||
git:
|
||||
repo: "{{ item.value.build.repository }}"
|
||||
dest: /tmp/{{ item.key }}
|
||||
version: "{{ item.value.build.version }}"
|
||||
accept_hostkey: true
|
||||
loop: "{{ omni_compose_apps | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
rescue:
|
||||
- name: Remove existing repository downloads
|
||||
file:
|
||||
path: /tmp/{{ item.key }}
|
||||
state: absent
|
||||
loop: "{{ omni_compose_apps | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- name: Clone repositories
|
||||
when: item.value.build is defined
|
||||
git:
|
||||
repo: "{{ item.value.build.repository }}"
|
||||
dest: /tmp/{{ item.key }}
|
||||
version: "{{ item.value.build.version }}"
|
||||
accept_hostkey: true
|
||||
loop: "{{ omni_compose_apps | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- name: Build image
|
||||
when: item.value.build is defined
|
||||
|
Reference in New Issue
Block a user