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: