From 985e76e71ba24b0a5b42f0221748107ab7f0e9e4 Mon Sep 17 00:00:00 2001 From: clyhtsuriva Date: Fri, 4 Apr 2025 19:36:21 +0200 Subject: ansible: remove docker git repo cloning task --- .../roles/docker/tasks/clone_docker_subfolder.yml | 43 ---------------------- ansible/roles/docker/tasks/main.yml | 3 -- 2 files changed, 46 deletions(-) delete mode 100644 ansible/roles/docker/tasks/clone_docker_subfolder.yml diff --git a/ansible/roles/docker/tasks/clone_docker_subfolder.yml b/ansible/roles/docker/tasks/clone_docker_subfolder.yml deleted file mode 100644 index 772e551..0000000 --- a/ansible/roles/docker/tasks/clone_docker_subfolder.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -- name: Ensure Git is installed - ansible.builtin.package: - name: git - state: present - -- name: Ensure repository is cloned - ansible.builtin.git: - # Using the mirror, as git.adjutor.xyz is a dumb http - repo: "https://github.com/clyhtsuriva/homelab-iac__mirror.git" - dest: "/opt/homelab-iac" - version: master - depth: 1 - clone: true - update: false - bare: false - -- name: Check if sparse checkout is already enabled - ansible.builtin.command: - cmd: git config core.sparseCheckout - chdir: "/opt/homelab-iac" - register: sparse_checkout_status - ignore_errors: true - changed_when: false - -- name: Enable sparse checkout (cone mode) if not already enabled - ansible.builtin.command: - cmd: git sparse-checkout init --cone - chdir: "/opt/homelab-iac" - when: sparse_checkout_status.rc != 0 - -- name: Check if the sparse checkout directory is already set - ansible.builtin.command: - cmd: git sparse-checkout list - chdir: "/opt/homelab-iac" - register: sparse_checkout_list - changed_when: false - -- name: Set the sparse checkout path if not already set - ansible.builtin.command: - cmd: git sparse-checkout set docker - chdir: "/opt/homelab-iac" - when: "'docker' not in sparse_checkout_list.stdout" diff --git a/ansible/roles/docker/tasks/main.yml b/ansible/roles/docker/tasks/main.yml index 6f14f98..ae0d995 100644 --- a/ansible/roles/docker/tasks/main.yml +++ b/ansible/roles/docker/tasks/main.yml @@ -1,7 +1,4 @@ --- - name: Install Docker ansible.builtin.include_tasks: install_docker.yml - -- name: Clone the Docker subfolder - ansible.builtin.include_tasks: clone_docker_subfolder.yml ... -- cgit v1.2.3