Mark .git dirs safe when marking ansible roles safe for git

In the previous change we set the top level ansible role git repo dir as
safe for git to perform clones against. It seems that for this to work
the way we want it to we actually need to mark the .git dir as safe
instead. Go ahead and do so here.

Change-Id: Id877c721e94d015f68cb51fb862b220da0414970
This commit is contained in:
Clark Boylan 2024-06-10 08:15:44 -07:00
parent cfc5e72479
commit faf32b452d

View File

@ -3,7 +3,7 @@
# a creates attribute on this task. However, subsequent runs of this
# command seem to noop if the entries are already present so the impact
# is low.
command: git config --global safe.directory '{{ ansible_role_src_root }}/src/opendev.org/opendev/ansible-role-{{ ansible_role }}'
command: git config --global safe.directory '{{ ansible_role_src_root }}/src/opendev.org/opendev/ansible-role-{{ ansible_role }}/.git'
loop: '{{ ansible_roles }}'
loop_control:
loop_var: ansible_role