48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
---
|
|
# stash media manager
|
|
|
|
# helm should be run from local environment
|
|
- name: check we can access the cluster
|
|
local_action:
|
|
module: kubernetes.core.helm_info
|
|
# kubeconfig: "/etc/rancher/k3s/k3s.yaml"
|
|
context: "{{kube_context}}"
|
|
name: test
|
|
release_namespace: kube-system
|
|
# release_state: all
|
|
register: default_namespace
|
|
|
|
- name: create persistent volume resources
|
|
kubernetes.core.k8s:
|
|
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
|
|
state: present
|
|
definition: "{{ lookup('file', item) | from_yaml }}"
|
|
loop:
|
|
- stash/pv.yaml
|
|
- stash/pv-claim.yaml
|
|
become: true
|
|
|
|
- name: Add stash chart helm repo
|
|
local_action:
|
|
module: kubernetes.core.helm_repository
|
|
name: k8s-at-home
|
|
repo_url: https://k8s-at-home.com/charts/
|
|
|
|
- name: load variables files/stash/values.yaml
|
|
ansible.builtin.include_vars:
|
|
file: files/stash/values.yaml
|
|
name: stash_values
|
|
|
|
- name: Install stash Chart
|
|
local_action:
|
|
module: kubernetes.core.helm
|
|
release_state: present
|
|
name: stash
|
|
namespace: testing
|
|
create_namespace: yes
|
|
update_repo_cache: True
|
|
chart_ref: k8s-at-home/stash
|
|
values: "{{stash_values}}"
|
|
wait: true
|
|
|