baseline/baseline.yml

33 lines
1 KiB
YAML

# vim: filetype=yaml.ansible
---
- 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
- name: add chart repos
kubernetes.core.helm_repository:
name: "{{ item.value.chart.split('/')[0] }}"
repo_url: "{{ item.value.url }}"
loop: "{{ helm_charts | dict2items }}"
- name: update helm repos
command: helm repo update
changed_when: no
- 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) }}"
create_namespace: true
loop: "{{ helm_charts | dict2items }}"
- name: apply post-install manifests
k8s:
src: "{{ item }}"
with_fileglob:
- files/*.yml