From cb84a02b6f976028956ae1764191bf1a850c1f1a Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Mon, 27 Jun 2022 12:27:11 +0200 Subject: [PATCH] Readd parse_logic --- ansible/roles/metacluster/tasks/components.yml | 2 +- ansible/vars/metacluster.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/roles/metacluster/tasks/components.yml b/ansible/roles/metacluster/tasks/components.yml index 1fd802a..5cd59fa 100644 --- a/ansible/roles/metacluster/tasks/components.yml +++ b/ansible/roles/metacluster/tasks/components.yml @@ -23,7 +23,7 @@ - name: Parse helm charts for container images ansible.builtin.shell: - cmd: helm template . | yq --no-doc eval '.. | .image? | select(.)' - | sort -u | awk '!/ /' + cmd: "{{ item.value.helm.parse_logic }}" chdir: /opt/metacluster/helm-charts/{{ item.key }} register: containerimages loop: "{{ lookup('ansible.builtin.dict', components) }}" diff --git a/ansible/vars/metacluster.yml b/ansible/vars/metacluster.yml index 9c3f406..30e0fd9 100644 --- a/ansible/vars/metacluster.yml +++ b/ansible/vars/metacluster.yml @@ -17,16 +17,19 @@ components: helm: version: 1.3.0 chart: longhorn/longhorn + parse_logic: cat values.yaml | yq eval '.. | select(has("repository")) | .repository + ":" + .tag' harbor: helm: version: 1.9.1 # (= Harbor v2.5.1) chart: harbor/harbor + parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /' argo-cd: helm: version: 4.9.7 # (= ArgoCD v2.4.2) chart: argo/argo-cd + parse_logic: helm template . | yq --no-doc eval '.. | .image? | select(.)' | sort -u | awk '!/ /' dependencies: