- Disable `global.persistence.storageClass` in defaults to use cluster default - Remove redundant commented `mode: 256` line in helm task for clarity
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
---
|
|
- name: Helm | Update chart repositories
|
|
ansible.builtin.command: helm repo update
|
|
environment:
|
|
KUBECONFIG: "{{ homeassistant_kubeconfig }}"
|
|
PATH: "/usr/local/bin:/usr/bin:/bin"
|
|
changed_when: false
|
|
ignore_errors: true
|
|
|
|
- name: Helm | Render Home Assistant values
|
|
ansible.builtin.template:
|
|
src: homeassistant-values.yml.j2
|
|
dest: /tmp/homeassistant-values.yml
|
|
mode: "0600"
|
|
|
|
- name: Helm | Install or upgrade Home Assistant
|
|
ansible.builtin.command: >
|
|
helm upgrade --install {{ homeassistant_release_name }}
|
|
oci://ghcr.io/home-assistant/charts
|
|
--namespace {{ homeassistant_namespace }}
|
|
--version {{ homeassistant_chart_version }}
|
|
--values /tmp/homeassistant-values.yml
|
|
--timeout 10m0s
|
|
--wait
|
|
environment:
|
|
KUBECONFIG: "{{ homeassistant_kubeconfig }}"
|
|
PATH: "/usr/local/bin:/usr/bin:/bin"
|
|
register: _helm_install
|
|
changed_when: "'STATUS: deployed' in _helm_install.stdout or 'has been upgraded' in _helm_install.stdout"
|
|
ignore_errors: true
|
|
|
|
- name: Kubernetes | Create Home Assistant resources
|
|
ansible.builtin.include_tasks: kubernetes.yml
|
|
when: _helm_install is failed or _helm_install is skipped
|