From ac5d3e3668701a6440d55bdb4f2eca30455efad4 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Thu, 24 Aug 2023 09:47:58 +0200 Subject: [PATCH] fix: Create folderstructure after cloning git repository --- ansible/roles/assets/tasks/main.yml | 2 -- .../bootstrap/roles/workloadcluster/tasks/gitops.yml | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ansible/roles/assets/tasks/main.yml b/ansible/roles/assets/tasks/main.yml index ad8bc81..820903c 100644 --- a/ansible/roles/assets/tasks/main.yml +++ b/ansible/roles/assets/tasks/main.yml @@ -16,8 +16,6 @@ - /opt/metacluster/helm-charts - /opt/metacluster/k3s - /opt/metacluster/kube-vip - - /opt/workloadcluster/git-repositories/gitops/charts - - /opt/workloadcluster/git-repositories/gitops/values - /opt/workloadcluster/helm-charts - /opt/workloadcluster/node-templates - /var/lib/rancher/k3s/agent/images diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml index d66e17b..9c3002a 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml @@ -11,6 +11,14 @@ dest: /opt/workloadcluster/git-repositories/gitops version: main +- name: Create folder structure within new git-repository + ansible.builtin.file: + path: "{{ item }}" + state: directory + loop: + - /opt/workloadcluster/git-repositories/gitops/charts + - /opt/workloadcluster/git-repositories/gitops/values + - name: Create hard-links to populate new git-repository ansible.builtin.shell: cmd: >-