images/helm-chart-collator/playbooks/create_repository.yaml
Ian Howell 116eb2cc93 Add a Helm chart collator
This adds a Dockerfile for an image which works as a Helm chart
repository. Charts can be pulled from either pre-existing
Helm repos or from git repos.

Change-Id: I860394eea3c322f2b142ea00dd7cc0a6916c34d5
2020-07-02 14:27:46 -05:00

34 lines
800 B
YAML

---
- hosts: all
tasks:
- name: create charts directory
file:
path: /charts
state: directory
- include_role:
name: ensure_helm
- include_role:
name: install_helm_repo_charts
loop: "{{ CHARTS | from_yaml | json_query('helm_repos[*]') | default([], true) }}"
loop_control:
loop_var: chart
- include_role:
name: install_git_repo_charts
loop: "{{ CHARTS | from_yaml | json_query('git_repos[*]') | default([], true) }}"
loop_control:
loop_var: chart
- include_role:
name: install_tarred_charts
loop: "{{ CHARTS | from_yaml | json_query('tarred_charts[*]') | default([], true) }}"
loop_control:
loop_var: chart
- name: create index.yaml
shell:
cmd: helm repo index /charts > /charts/index.yaml