2022-01-02 19:06:43 +00:00
|
|
|
# vim: filetype=yaml.ansible
|
|
|
|
---
|
2021-11-28 22:36:39 +00:00
|
|
|
- hosts: localhost
|
|
|
|
gather_facts: no
|
|
|
|
connection: local
|
|
|
|
tasks:
|
2022-01-02 19:22:04 +00:00
|
|
|
- name: load carts list and definition
|
|
|
|
include_vars: helm.yml
|
2021-11-28 22:36:39 +00:00
|
|
|
- name: add chart repos
|
2022-02-04 07:48:55 +00:00
|
|
|
kubernetes.core.helm_repository:
|
2022-02-07 09:57:09 +00:00
|
|
|
name: "{{ item.chart.split('/')[0] }}"
|
2021-12-05 13:12:26 +00:00
|
|
|
repo_url: "{{ item.url }}"
|
2022-02-07 09:57:09 +00:00
|
|
|
loop: "{{ helm_charts }}"
|
2022-01-02 19:06:04 +00:00
|
|
|
- name: update helm repos
|
|
|
|
command: helm repo update
|
|
|
|
changed_when: no
|
2021-11-28 22:36:39 +00:00
|
|
|
- name: install charts
|
2022-02-04 07:48:55 +00:00
|
|
|
kubernetes.core.helm:
|
2021-12-05 13:12:26 +00:00
|
|
|
name: "{{ item.name }}"
|
|
|
|
chart_ref: "{{ item.chart }}"
|
|
|
|
chart_version: "{{ item.version|default(omit) }}"
|
|
|
|
values: "{{ item.vals|default(omit) }}"
|
|
|
|
release_namespace: "{{ item.namespace | default(item.name) }}"
|
2021-11-28 22:36:39 +00:00
|
|
|
create_namespace: true
|
2021-12-05 13:12:26 +00:00
|
|
|
loop: "{{ helm_charts }}"
|
2021-11-28 22:36:39 +00:00
|
|
|
- name: apply post-install manifests
|
|
|
|
k8s:
|
2022-01-02 19:22:22 +00:00
|
|
|
src: "{{ item }}"
|
|
|
|
with_fileglob:
|
|
|
|
- files/*.yml
|