k8s/roles/uyuni/tasks/helm.yml
mrwho 45a7ea0d93 feat(infra): add cert-manager role and setup playbook
Introduce cert-manager role and a dedicated playbook for automated certificate management setup, complementing the newly restructured uyuni role for comprehensive infrastructure automation.
2026-07-19 15:32:16 +03:00

65 lines
2.4 KiB
YAML

---
- name: Helm | Install or upgrade Uyuni from OCI registry
ansible.builtin.command: >
helm upgrade --install uyuni-server oci://registry.opensuse.org/uyuni/server-helm
--namespace {{ uyuni_namespace }}
--create-namespace
--version {{ uyuni_chart_version }}
--set {{ item.key }}={{ item.value }}
--timeout 20m0s
--wait
loop: "{{ uyuni_helm_values | dict2items }}"
environment:
KUBECONFIG: "{{ uyuni_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"
when: uyuni_helm_values is defined
- name: Helm | Install or upgrade Uyuni from OCI registry (no values)
ansible.builtin.command: >
helm upgrade --install uyuni-server oci://registry.opensuse.org/uyuni/server-helm
--namespace {{ uyuni_namespace }}
--create-namespace
--version {{ uyuni_chart_version }}
--timeout 20m0s
--wait
environment:
KUBECONFIG: "{{ uyuni_kubeconfig }}"
PATH: "/usr/local/bin:/usr/bin:/bin"
register: _helm_install_simple
changed_when: "'STATUS: deployed' in _helm_install_simple.stdout or 'has been upgraded' in _helm_install_simple.stdout"
when: uyuni_helm_values is not defined
- name: Helm | Install or upgrade Uyuni
ansible.builtin.command: >
helm upgrade --install uyuni-server uyuni/uyuni-server
--namespace {{ uyuni_namespace }}
--create-namespace
--version {{ uyuni_chart_version }}
--set {{ item.key }}={{ item.value }}
--timeout 20m0s
--wait
loop: "{{ uyuni_helm_values | dict2items }}"
environment:
KUBECONFIG: "{{ uyuni_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"
when: uyuni_helm_values is defined
- name: Helm | Install or upgrade Uyuni (no values)
ansible.builtin.command: >
helm upgrade --install uyuni-server uyuni/uyuni-server
--namespace {{ uyuni_namespace }}
--create-namespace
--version {{ uyuni_chart_version }}
--timeout 20m0s
--wait
environment:
KUBECONFIG: "{{ uyuni_kubeconfig }}"
PATH: "/usr/local/bin:/usr/bin:/bin"
register: _helm_install_simple
changed_when: "'STATUS: deployed' in _helm_install_simple.stdout or 'has been upgraded' in _helm_install_simple.stdout"
when: uyuni_helm_values is not defined