From 310c65cf3beb5f42d1bba3419957abf397743a46 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Wed, 27 Apr 2022 15:17:50 +0200 Subject: [PATCH] Remove dynamic versioning; Move applications to vars_file --- playbook.yml | 39 ++++++++++++--------------------------- vars/applications.k3s.yml | 23 ++++++++++++++++++++--- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/playbook.yml b/playbook.yml index 2eb450a..1479afe 100644 --- a/playbook.yml +++ b/playbook.yml @@ -207,30 +207,15 @@ no_log: true loop: "{{ helm.repositories }}" - - block: - - - name: Rancher Fleet -- Determine latest version - ansible.builtin.uri: - url: https://api.github.com/repos/rancher/fleet/releases/latest - return_content: yes - register: latest_release - - - name: Rancher Fleet -- Install Helm chart w/ prereqs - kubernetes.core.helm: - name: "{{ item.name }}" - chart_ref: "{{ item.ref }}" - namespace: fleet-system - create_namespace: yes - wait: yes - kubeconfig: "{{ kubeconfig.path }}" - values: "{{ item.setvalues | default(omit) }}" - loop: - - name: cert-manager - ref: jetstack/cert-manager - setvalues: - installCRDs: true - - name: fleet-crd - ref: "https://github.com/rancher/fleet/releases/download/{{ latest_release.json.tag_name }}/fleet-crd-{{ latest_release.json.tag_name[1:] }}.tgz" - - name: fleet - ref: "https://github.com/rancher/fleet/releases/download/{{ latest_release.json.tag_name }}/fleet-{{ latest_release.json.tag_name[1:] }}.tgz" - + - name: Install Helm charts + kubernetes.core.helm: + name: "{{ item.name }}" + chart_ref: "{{ item.ref }}" + namespace: "{{ item.namespace }}" + create_namespace: yes + wait: yes + kubeconfig: "{{ kubeconfig.path }}" + values: "{{ item.setvalues | default(omit) }}" + args: + warn: false + loop: "{{ helm.charts }}" diff --git a/vars/applications.k3s.yml b/vars/applications.k3s.yml index 02d15f2..b89ef19 100644 --- a/vars/applications.k3s.yml +++ b/vars/applications.k3s.yml @@ -1,6 +1,23 @@ helm: repositories: - - name: rancher-stable - url: https://releases.rancher.com/server-charts/stable + # - name: rancher-stable + # url: https://releases.rancher.com/server-charts/stable - name: jetstack - url: https://charts.jetstack.io \ No newline at end of file + url: https://charts.jetstack.io + - name: gitea-charts + url: https://dl.gitea.io/charts/ + charts: + - name: cert-manager + namespace: cert-manager + ref: jetstack/cert-manager + setvalues: + installCRDs: true + - name: gitea + namespace: gitea + ref: gitea-charts/gitea + - name: fleet-crd + namespace: fleet-system + ref: "https://github.com/rancher/fleet/releases/download/v0.3.9/fleet-crd-0.3.9.tgz" + - name: fleet + namespace: fleet-system + ref: "https://github.com/rancher/fleet/releases/download/v0.3.9/fleet-0.3.9.tgz"