Do not clone role being tested as a dep outside openstack-ci

When executing the clones outside of openstack-ci, we should
verify that we're not cloning the role repository for the role
we are testing because we already have it.

Change-Id: Ibc64fc5c97f0b711934eb3e297159b0d38587647
This commit is contained in:
Jesse Pretorius 2018-04-30 17:47:13 +01:00
parent e8bdfbe222
commit 0fa83f7d3d

View File

@ -61,10 +61,6 @@
- name: Clone git repos (outside openstack-ci)
when: not _openstack_ci.stat.exists
block:
- name: Prepare git clone list
set_fact:
git_roles: "{{ osa_roles }}"
- name: Clone git repos
git:
repo: "{{ item['src'] }}"
@ -73,11 +69,12 @@
depth: "{{ item['depth'] | default('10') }}"
update: true
force: true
with_items: "{{ git_roles }}"
with_items: "{{ osa_roles }}"
retries: "{{ git_clone_retries | default(3) }}"
delay: "{{ git_clone_retry_delay | default(5) }}"
when:
- item['scm'] == "git" or item['scm'] is undefined
- role_name == '' or item['name'] != role_name
- name: Clone git repos (inside openstack-ci)
when: _openstack_ci.stat.exists