baseline/baseline.yml

34 lines
1 KiB
YAML
Raw Normal View History

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:
- name: load charts list and definition
include_vars:
dir: vars/helm/
ignore_unknown_extensions: yes
name: helm_charts
2021-11-28 22:36:39 +00:00
- name: add chart repos
kubernetes.core.helm_repository:
name: "{{ item.value.chart.split('/')[0] }}"
repo_url: "{{ item.value.url }}"
loop: "{{ helm_charts | dict2items }}"
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
kubernetes.core.helm:
name: "{{ item.key }}"
chart_ref: "{{ item.value.chart }}"
chart_version: "{{ item.value.version|default(omit) }}"
values: "{{ item.value.vals|default(omit) }}"
release_namespace: "{{ item.value.namespace | default(item.key) }}"
2021-11-28 22:36:39 +00:00
create_namespace: true
loop: "{{ helm_charts | dict2items }}"
2021-11-28 22:36:39 +00:00
- name: apply post-install manifests
k8s:
src: "{{ item }}"
with_fileglob:
- files/*.yml