From 9f324c5d5fff74acfaa6b0b257510f3e948b1162 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Mon, 26 Aug 2024 16:26:53 +0100 Subject: Improve formatting of git clone command for mirrors --- ansible/roles/git-mirrors/tasks/main.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ansible') diff --git a/ansible/roles/git-mirrors/tasks/main.yml b/ansible/roles/git-mirrors/tasks/main.yml index 674e708..0c2f78b 100644 --- a/ansible/roles/git-mirrors/tasks/main.yml +++ b/ansible/roles/git-mirrors/tasks/main.yml @@ -53,9 +53,13 @@ - name: Clone repositories # noqa: command-instead-of-module become: true become_user: "{{ git_mirrors_user }}" - command: > - git clone --mirror https://github.com/{{ item.owner }}/{{ item.repo }}.git {{ git_mirrors_base_dir }}/mirrored/{{ item.owner }}/{{ item.repo }} - args: + command: + argv: + - "git" + - "clone" + - "--mirror" + - "https://github.com/{{ item.owner }}/{{ item.repo }}.git" + - "{{ git_mirrors_base_dir }}/mirrored/{{ item.owner }}/{{ item.repo }}" creates: "{{ git_mirrors_base_dir }}/mirrored/{{ item.owner }}/{{ item.repo }}" with_items: - "{{ git_mirrors_mirrored_repositories }}" -- cgit v1.2.3