aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclyhtsuriva <aimeric@adjutor.xyz>2025-04-04 19:36:21 +0200
committerclyhtsuriva <aimeric@adjutor.xyz>2025-04-04 19:36:21 +0200
commit985e76e71ba24b0a5b42f0221748107ab7f0e9e4 (patch)
tree0db95212c0d0901e8bbcbe0c781317a24822a1a1
parentbdedbd2873201c886be78d81a1c2492711fe237a (diff)
ansible: remove docker git repo cloning taskHEADmaster
-rw-r--r--ansible/roles/docker/tasks/clone_docker_subfolder.yml43
-rw-r--r--ansible/roles/docker/tasks/main.yml3
2 files changed, 0 insertions, 46 deletions
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
...