get-ansible-role-requiremnets: Use refspec to try Gerrit changes

Without this patch, deployers have to mimic zuul structure
to locally test Gerrit patches in-depth, with their specific
references, before they are merged into the main tree.

This is a problem for people wanting to not change the location
of the openstack-ansible folder.

This patches solves the problem by using the refspec
parameter of the ansible git module: A user can then
edit its own ansible-role-requirements for testing
patches.

Change-Id: I6c0fa078da3f32b542d3a3492a0fb79c822a5f8d
This commit is contained in:
Markos Chandras 2018-06-07 13:20:08 +01:00 committed by Jean-Philippe Evrard
parent d95da1cd43
commit a6e2e511a4

View File

@ -123,6 +123,7 @@
repo: "{{ item['src'] }}"
dest: "{{ lookup('env', 'ANSIBLE_ROLE_DEP_DIR') }}/{{ item['name'] | default(item['src'] | basename) }}"
version: "{{ item['version'] | default('master') }}"
refspec: "{{ item['refspec'] | default(omit) }}"
depth: "{{ item['depth'] | default('10') }}"
update: true
force: true