Merge "Mark source repos as safe in install-ansible-role"

This commit is contained in:
Zuul 2024-06-07 19:00:47 +00:00 committed by Gerrit Code Review
commit cfc5e72479

View File

@ -1,3 +1,13 @@
- name: Mark source side of clone as safe
# This goes into a config file with many entries so we cannot set
# 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 }}'
loop: '{{ ansible_roles }}'
loop_control:
loop_var: ansible_role
- name: Install ansible roles to /etc/ansible/roles
git:
repo: '{{ ansible_role_src_root }}/src/opendev.org/opendev/ansible-role-{{ ansible_role }}'