![Clark Boylan](/assets/img/avatar_default.png)
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
19 lines
771 B
YAML
19 lines
771 B
YAML
- 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 }}/.git'
|
|
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 }}'
|
|
dest: '/etc/ansible/roles/{{ ansible_role }}'
|
|
force: yes
|
|
loop: '{{ ansible_roles }}'
|
|
loop_control:
|
|
loop_var: ansible_role
|