From 0fa83f7d3d9b9831d0ca8d78d79ab4e539e8fe10 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Mon, 30 Apr 2018 17:47:13 +0100 Subject: [PATCH] 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 --- get-ansible-role-requirements.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/get-ansible-role-requirements.yml b/get-ansible-role-requirements.yml index 2854cc5b..5217c774 100644 --- a/get-ansible-role-requirements.yml +++ b/get-ansible-role-requirements.yml @@ -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