Reorganize vars dict;Parse & loop through dict key/values
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
487239365e
commit
d39d594bf0
@ -13,6 +13,8 @@
|
||||
group: root
|
||||
mode: 0755
|
||||
loop: "{{ dependencies.static_binaries | selectattr('archive', 'undefined') }}"
|
||||
loop_control:
|
||||
label: "{{ item.filename }}"
|
||||
|
||||
- name: Download, extract & install archived static binaries
|
||||
include_tasks: dependencies.archive_compressed.yml
|
||||
|
@ -4,10 +4,25 @@
|
||||
state: directory
|
||||
loop:
|
||||
- /opt/metacluster/components/harbor
|
||||
- /opt/metacluster/helm-charts
|
||||
|
||||
- name: Add helm repositories
|
||||
kubernetes.core.helm_repository:
|
||||
name: "{{ item.name }}"
|
||||
repo_url: "{{ item.url }}"
|
||||
state: present
|
||||
loop: "{{ components.helm_repositories }}"
|
||||
loop: "{{ platform.helm_repositories }}"
|
||||
|
||||
- name: Fetch helm charts
|
||||
ansible.builtin.command:
|
||||
cmd: helm fetch {{ item.value.chart_name }} --untar --version {{ item.value.version }}
|
||||
chdir: /opt/metacluster/helm-charts
|
||||
loop: "{{ lookup('ansible.builtin.dict', components) }}"
|
||||
|
||||
- ansible.builtin.command:
|
||||
cmd: ls -lashR /opt/metacluster/helm-charts
|
||||
register: results
|
||||
- ansible.builtin.debug:
|
||||
var: results
|
||||
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
k3s:
|
||||
version: v1.24.1+k3s1
|
||||
|
||||
components:
|
||||
platform:
|
||||
k3s:
|
||||
version: v1.24.1+k3s1
|
||||
|
||||
helm_repositories:
|
||||
- name: longhorn
|
||||
@ -9,14 +8,18 @@ components:
|
||||
- name: harbor
|
||||
url: https://helm.goharbor.io
|
||||
|
||||
components:
|
||||
|
||||
longhorn:
|
||||
version:
|
||||
version: 1.3.0
|
||||
helm_chart: longhorn/longhorn
|
||||
|
||||
harbor:
|
||||
version:
|
||||
version: 2.5.1
|
||||
helm_chart: harbor/harbor
|
||||
|
||||
argocd:
|
||||
version:
|
||||
# argocd:
|
||||
# version:
|
||||
|
||||
dependencies:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user