From faf32b452dd84da90b39a319d0ef62d0440ca69c Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 10 Jun 2024 08:15:44 -0700 Subject: [PATCH] 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 --- playbooks/roles/install-ansible-roles/tasks/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/roles/install-ansible-roles/tasks/main.yaml b/playbooks/roles/install-ansible-roles/tasks/main.yaml index 6483bb4ccb..72add6a979 100644 --- a/playbooks/roles/install-ansible-roles/tasks/main.yaml +++ b/playbooks/roles/install-ansible-roles/tasks/main.yaml @@ -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